aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasonix <asonix@asonix.dog>2024-03-03 14:35:01 -0600
committerAlex Auvolat <alex@adnab.me>2024-03-04 13:03:16 +0100
commit7c4f3473afa3e5501a21bf6e9466da52726bac8e (patch)
treee2e04d91fed94d26bbd8fcd47f1f84cb69a4fd2a /src
parentb6a91e549ba8fa9dad8f90fa8b98f282dc211551 (diff)
downloadgarage-7c4f3473afa3e5501a21bf6e9466da52726bac8e.tar.gz
garage-7c4f3473afa3e5501a21bf6e9466da52726bac8e.zip
Lowercase query parameter keys when parsing
Diffstat (limited to 'src')
-rw-r--r--src/api/signature/payload.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs
index 0029716a..250e007e 100644
--- a/src/api/signature/payload.rs
+++ b/src/api/signature/payload.rs
@@ -197,7 +197,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