You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2018/06/06 19:21:00 UTC

[trafficserver] branch master updated: Change MIMEHdr::value_append_or_set to handle duplicate headers (always add to last duplicate).

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 <am...@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.