Merge pull request #20841 from oritwas/wip-rgw-metadata

rgw: trim all spaces inside a metadata value

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Casey Bodley 2018-03-23 09:53:28 -04:00 committed by GitHub
commit 2a0bb28e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@
#include <boost/container/small_vector.hpp>
#include <boost/utility/string_view.hpp>
#include <boost/algorithm/string/trim_all.hpp>
#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<std::string>(value);
canonical_hdrs.append(name.data(), name.length())
.append(":", std::strlen(":"))