]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: reduce string copies in tempURL processing
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 23 Apr 2016 19:41:02 +0000 (15:41 -0400)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 2 Jun 2016 13:37:06 +0000 (15:37 +0200)
commita51e78a75f85f094efcac074c0a85b7440fe6be0
tree0c5d8ba74dc3753d72415370f449e8998f05fb38
parent751807452414acbdd0ad5a29bf2b0089bf530305
rgw: reduce string copies in tempURL processing

Introduce a helper class encapsulating the temp URL HMAC computation,
and also save it for later computation.  Use the underlying HMACSHA1
implementation to compute the HMAC incrementally (saves a copy of all
the parameters).

Also avoid some other string copying in the logic prior to taking the
HMAC, in one case by remembering to use auto& in a std::map range-for
loop, and using boost::string_ref to share ReqState::request_uri and
conditionally suffix of same.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Conflicts:
src/rgw/rgw_swift.cc
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_swift_auth.h