[F] Fix path joining
This commit is contained in:
+3
-3
@@ -67,9 +67,9 @@ impl MyApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn hello_world(&self, req: Request<Body>) -> http::Result<Response<Body>> {
|
async fn hello_world(&self, req: Request<Body>) -> http::Result<Response<Body>> {
|
||||||
let mut path: String = url_escape::decode(req.uri().path()).into_owned();
|
let rel: String = clean(&url_escape::decode(req.uri().path()));
|
||||||
path = format!(".{}", clean(&*path));
|
let path = self.generator.base.join(&rel.strip_prefix("/").unwrap());
|
||||||
println!("Raw path: {} | Sanitized path: {path}", req.uri().path());
|
println!("Raw path: {} | Sanitized path: {}", req.uri().path(), path.display());
|
||||||
|
|
||||||
let params = req.params();
|
let params = req.params();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user