Fix #514
This commit is contained in:
parent
50665bbeb3
commit
f5cd48b07f
@ -158,8 +158,8 @@ impl Server {
|
|||||||
Ok::<_, String>(service_fn(move |req: Request<Body>| {
|
Ok::<_, String>(service_fn(move |req: Request<Body>| {
|
||||||
let headers = default_headers.clone();
|
let headers = default_headers.clone();
|
||||||
|
|
||||||
// Remove double slashes
|
// Remove double slashes and decode encoded slashes
|
||||||
let mut path = req.uri().path().replace("//", "/");
|
let mut path = req.uri().path().replace("//", "/").replace("%2F","/");
|
||||||
|
|
||||||
// Remove trailing slashes
|
// Remove trailing slashes
|
||||||
if path != "/" && path.ends_with('/') {
|
if path != "/" && path.ends_with('/') {
|
||||||
|
Loading…
Reference in New Issue
Block a user