SignV4: trim leading/trailing spaces in header value (#99)

Signed-off-by: Bala.FA <bala@minio.io>
This commit is contained in:
Bala FA 2024-09-12 21:53:41 +05:30 committed by GitHub
parent b19513c90f
commit b254b2f7ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,7 +269,7 @@ pub fn get_canonical_headers(map: &Multimap) -> (String, String) {
if !value.is_empty() { if !value.is_empty() {
value.push(','); 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); value.push_str(&s);
} }
btmap.insert(key.clone(), value.clone()); btmap.insert(key.clone(), value.clone());