mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-22 08:01:02 +00:00
Lowercase query parameter keys when parsing
This commit is contained in:
parent
e285994977
commit
6ab80cd36a
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ pub fn parse_query_map(uri: &http::uri::Uri) -> Result<QueryMap, Error> {
|
|||
if let Some(query_str) = uri.query() {
|
||||
let query_pairs = url::form_urlencoded::parse(query_str.as_bytes());
|
||||
for (key, val) in query_pairs {
|
||||
if query.insert(key.to_string(), val.into_owned()).is_some() {
|
||||
if query.insert(key.to_lowercase().to_string(), val.into_owned()).is_some() {
|
||||
return Err(Error::bad_request(format!(
|
||||
"duplicate query parameter: `{}`",
|
||||
key
|
||||
|
|
Loading…
Reference in a new issue