do not ignore query parameters
This commit is contained in:
+1
-6
@@ -13,13 +13,8 @@ enum ResponseCode {
|
||||
NotFound,
|
||||
}
|
||||
|
||||
/// Remove query parameters and trailing slashes.
|
||||
/// Makes all paths lowercase.
|
||||
fn normalise_path(path: &str) -> String {
|
||||
let mut path = path
|
||||
.split('?')
|
||||
.next()
|
||||
.expect("split operation returns at least one substring");
|
||||
let mut path = path;
|
||||
while path.len() > 1
|
||||
&& let Some('/') = path.chars().next_back()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user