trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [trafficserver] branch master updated: Fix logging escapified multi-valued fields so the separator is escapified as well.
Date Fri, 08 Sep 2017 20:22:00 GMT
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 132236d  Fix logging escapified multi-valued fields so the separator is escapified
as well.
132236d is described below

commit 132236d3e2fdacb52db20bcbbcfcfa1cdf2431e9
Author: Alan M. Carroll <amc@apache.org>
AuthorDate: Fri Sep 8 12:48:08 2017 -0500

    Fix logging escapified multi-valued fields so the separator is escapified as well.
---
 proxy/logging/LogAccessHttp.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index 28ff3d0..66b6000 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -1623,14 +1623,15 @@ LogAccessHttp::marshal_http_header_field_escapify(LogField::Container
container,
         fld = fld->m_next_dup;
 
         // Dups need to be comma separated.  So if there's another
-        // dup, then add a comma and a space ...
-        //
+        // dup, then add a comma and an escapified space ...
+        constexpr const char SEP[] = ",%20";
+        constexpr size_t SEP_LEN   = sizeof(SEP) - 1;
         if (fld != nullptr) {
           if (buf) {
-            memcpy(buf, ", ", 2);
-            buf += 2;
+            memcpy(buf, SEP, SEP_LEN);
+            buf += SEP_LEN;
           }
-          running_len += 2;
+          running_len += SEP_LEN;
         }
       }
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message