mirror of
https://github.com/spikecodes/libreddit.git
synced 2026-01-15 09:12:33 +01:00
Fix #514
This commit is contained in:
@@ -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('/') {
|
||||
|
||||
Reference in New Issue
Block a user