diff options
author | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-04-08 06:45:37 +0000 |
---|---|---|
committer | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-04-08 06:45:37 +0000 |
commit | 1beb4c992393b774b11cc3bad444c104dd263562 (patch) | |
tree | 9293c918a1d863ad962a45e5a9fd2b62c433151b /tests/serve_request.rs | |
parent | Test URL encoding for special characters (diff) | |
download | miniserve-1beb4c992393b774b11cc3bad444c104dd263562.tar.gz miniserve-1beb4c992393b774b11cc3bad444c104dd263562.zip |
Avoid double-encoding file URL
Now that the '%' char itself is accepted in the file name and is encoded
into '%25', this exposed a previously silent bug:
`base` is already percent-encoded but it is encoded again when setting
`file_url`. This produces erroneous URLs such as:
'/%2523/x.y' instead of '/%23/x.y' for the path '/#/x.y'
Diffstat (limited to 'tests/serve_request.rs')
0 files changed, 0 insertions, 0 deletions