diff --git a/src/server.rs b/src/server.rs index 59ddad1..1d44d1b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -208,7 +208,8 @@ fn read_all(readable: &mut impl Read) -> io::Result> { fn matches_to_route(route: String, path: String) -> (bool, HashMap) { let route = route.split('/').filter(|el| el != &""); - let path = path.split('/').filter(|el| el != &""); + let path = path.split('?').next().unwrap() + .split('/').filter(|el| el != &""); if route.clone().count() != path.clone().count() { return (false, HashMap::new());