You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/08/30 23:39:47 UTC
[trafficserver] branch 7.1.x updated: S3_auth:uri(En|De)code() pass
by ref, not val(master)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 9e53eac S3_auth:uri(En|De)code() pass by ref,not val(master)
9e53eac is described below
commit 9e53eac7053938d3d0710373456f3c6f88f361d8
Author: Gancho Tenev <ga...@apache.com>
AuthorDate: Wed Aug 30 15:43:49 2017 -0700
S3_auth:uri(En|De)code() pass by ref,not val(master)
Changed to pass the input const String by ref instead of value.
(cherry picked from commit 23a3f24b8567ad54968943ee4a258c865a866ff6)
---
plugins/s3_auth/aws_auth_v4.cc | 2 +-
plugins/s3_auth/unit-tests/test_aws_auth_v4.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/s3_auth/aws_auth_v4.cc b/plugins/s3_auth/aws_auth_v4.cc
index 1475111..58c0b8e 100644
--- a/plugins/s3_auth/aws_auth_v4.cc
+++ b/plugins/s3_auth/aws_auth_v4.cc
@@ -114,7 +114,7 @@ uriEncode(const String &in, bool isObjectName)
* @return encoded string.
*/
String
-uriDecode(const String in)
+uriDecode(const String &in)
{
std::string result;
result.reserve(in.length());
diff --git a/plugins/s3_auth/unit-tests/test_aws_auth_v4.h b/plugins/s3_auth/unit-tests/test_aws_auth_v4.h
index 3306b8e..b46274d 100644
--- a/plugins/s3_auth/unit-tests/test_aws_auth_v4.h
+++ b/plugins/s3_auth/unit-tests/test_aws_auth_v4.h
@@ -119,8 +119,8 @@ public:
/* Expose the following methods only to the unit tests */
String base16Encode(const char *in, size_t inLen);
-String uriEncode(const String in, bool isObjectName = false);
-String uriDecode(const String in);
+String uriEncode(const String &in, bool isObjectName = false);
+String uriDecode(const String &in);
String lowercase(const char *in, size_t inLen);
const char *trimWhiteSpaces(const char *in, size_t inLen, size_t &newLen);
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].