Skip to content

Commit

Permalink
SignV4: trim leading/trailing spaces in header value
Browse files Browse the repository at this point in the history
Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana committed Aug 17, 2024
1 parent b19513c commit 7c39ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/s3/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ pub fn get_canonical_headers(map: &Multimap) -> (String, String) {
if !value.is_empty() {
value.push(',');
}
let s: String = MULTI_SPACE_REGEX.replace_all(&v, " ").to_string();
let s: String = MULTI_SPACE_REGEX.replace_all(&v, " ").trim().to_string();
value.push_str(&s);
}
btmap.insert(key.clone(), value.clone());
Expand Down

0 comments on commit 7c39ffe

Please sign in to comment.