This commit is contained in:
spikecodes 2022-05-21 21:06:03 -07:00
parent 50665bbeb3
commit f5cd48b07f
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB

View File

@ -158,8 +158,8 @@ impl Server {
Ok::<_, String>(service_fn(move |req: Request<Body>| {
let headers = default_headers.clone();
// Remove double slashes
let mut path = req.uri().path().replace("//", "/");
// Remove double slashes and decode encoded slashes
let mut path = req.uri().path().replace("//", "/").replace("%2F","/");
// Remove trailing slashes
if path != "/" && path.ends_with('/') {