This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit d858b4c32e3122042a6a93c2fbdc7373b4cf5986
Author: Alan M. Carroll <[email protected]>
AuthorDate: Wed Jun 6 11:58:41 2018 -0500

    Change MIMEHdr::value_append_or_set to handle duplicate headers (always add 
to last duplicate).
    
    (cherry picked from commit d01fa15a4ac8a21c46423de3d986da653b20f27d)
---
 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
[email protected].

Reply via email to