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: Change MIMEHdr::value_append_or_set to handle duplicate headers (always add to last duplicate).
Date Wed, 06 Jun 2018 19:21: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 d01fa15  Change MIMEHdr::value_append_or_set to handle duplicate headers (always
add to last duplicate).
d01fa15 is described below

commit d01fa15a4ac8a21c46423de3d986da653b20f27d
Author: Alan M. Carroll <amc@apache.org>
AuthorDate: Wed Jun 6 11:58:41 2018 -0500

    Change MIMEHdr::value_append_or_set to handle duplicate headers (always add to last duplicate).
---
 proxy/hdrs/MIME.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h
index 6cc3751..7ebc3bb 100644
--- a/proxy/hdrs/MIME.h
+++ b/proxy/hdrs/MIME.h
@@ -1383,6 +1383,9 @@ MIMEHdr::value_append_or_set(const char *name, const int name_length,
char *valu
   MIMEField *field = nullptr;
 
   if ((field = field_find(name, name_length)) != nullptr) {
+    while (field->m_next_dup) {
+      field = field->m_next_dup;
+    }
     field_value_append(field, value, value_length, true);
   } else {
     value_set(name, name_length, value, value_length);

-- 
To stop receiving notification emails like this one, please contact
amc@apache.org.

Mime
View raw message