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 cd4ef14 commit 654a824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void Multimap::GetCanonicalHeaders(std::string& signed_headers,
std::string value;
for (const auto& v : values) {
if (!value.empty()) value += ",";
value += std::regex_replace(v, MULTI_SPACE_REGEX, " ");
value += utils::Trim(std::regex_replace(v, MULTI_SPACE_REGEX, " "));
}

map[key] = value;
Expand Down

0 comments on commit 654a824

Please sign in to comment.