mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
fix query splitting
This commit is contained in:
parent
b2670c94f4
commit
5cd25cc8b1
@ -255,7 +255,7 @@ impl Reader {
|
|||||||
if let Ok(path) = percent_encoding::percent_decode(&path).decode_utf8() {
|
if let Ok(path) = percent_encoding::percent_decode(&path).decode_utf8() {
|
||||||
let parts: Vec<&str> = path.splitn(2, '?').collect();
|
let parts: Vec<&str> = path.splitn(2, '?').collect();
|
||||||
if parts.len() == 2 {
|
if parts.len() == 2 {
|
||||||
Some((parts[0].to_owned(), parts[1][1..].to_owned()))
|
Some((parts[0].to_owned(), parts[1].to_owned()))
|
||||||
} else {
|
} else {
|
||||||
Some((parts[0].to_owned(), String::new()))
|
Some((parts[0].to_owned(), String::new()))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user