diff --git a/src/rgw/rgw_auth_s3.cc b/src/rgw/rgw_auth_s3.cc index 551ced31434..f4bd2522c9f 100644 --- a/src/rgw/rgw_auth_s3.cc +++ b/src/rgw/rgw_auth_s3.cc @@ -17,6 +17,7 @@ #include #include +#include #define dout_context g_ceph_context #define dout_subsys ceph_subsys_rgw @@ -616,7 +617,8 @@ get_v4_canonical_headers(const req_info& info, std::string canonical_hdrs; for (const auto& header : canonical_hdrs_map) { const boost::string_view& name = header.first; - const std::string& value = header.second; + std::string value = header.second; + boost::trim_all(value); canonical_hdrs.append(name.data(), name.length()) .append(":", std::strlen(":"))