From b1bb6e6d0682a5d0b54b7e76a5775b2c117f6901 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 17 Jul 2017 08:38:02 -0400 Subject: [PATCH] rgw: switch from boost::string_ref to boost::string_view in rgw_swift_auth.cc. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_swift_auth.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 9674424b03539..39c80f0d4b1a9 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -3,7 +3,7 @@ #include -#include +#include #include #include "rgw_swift_auth.h" @@ -160,8 +160,8 @@ public: SignatureHelper() = default; const char* calc(const std::string& key, - const boost::string_ref& method, - const boost::string_ref& path, + const boost::string_view& method, + const boost::string_view& path, const std::string& expires) { using ceph::crypto::HMACSHA1; @@ -228,14 +228,14 @@ TempURLEngine::authenticate(const req_state* const s) const /* XXX can we search this ONCE? */ const size_t pos = g_conf->rgw_swift_url_prefix.find_last_not_of('/') + 1; - boost::string_ref ref_uri = s->decoded_uri; - const std::array allowed_paths = { + const boost::string_view ref_uri = s->decoded_uri; + const std::array allowed_paths = { ref_uri, ref_uri.substr(pos + 1) }; /* Account owner calculates the signature also against a HTTP method. */ - boost::container::static_vector allowed_methods; + boost::container::static_vector allowed_methods; if (strcmp("HEAD", s->info.method) == 0) { /* HEAD requests are specially handled. */ /* TODO: after getting a newer boost (with static_vector supporting -- 2.39.5