Repository: trafficserver Updated Branches: refs/heads/master b3ec3c568 -> 63ae314a5
TS-3595: Cookie header split into multiple lines with H2 Changed to not be recursive Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/63ae314a Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/63ae314a Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/63ae314a Branch: refs/heads/master Commit: 63ae314a50dcc0b0811f6fb044b1ca1afbc72a31 Parents: b3ec3c5 Author: Bryan Call <[email protected]> Authored: Tue Jul 7 18:52:02 2015 -0700 Committer: Bryan Call <[email protected]> Committed: Tue Jul 7 18:52:02 2015 -0700 ---------------------------------------------------------------------- proxy/hdrs/MIME.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/63ae314a/proxy/hdrs/MIME.h ---------------------------------------------------------------------- diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h index eb57f88..f55da24 100644 --- a/proxy/hdrs/MIME.h +++ b/proxy/hdrs/MIME.h @@ -1329,21 +1329,22 @@ MIMEHdr::field_value_append(MIMEField *field, const char *value_str, int value_l field->value_append(m_heap, m_mime, value_str, value_len, prepend_comma, separator); } - inline void MIMEHdr::field_combine_dups(MIMEField *field, bool prepend_comma, const char separator) { - if (field->has_dups()) { - MIMEField *duplicate = field->m_next_dup; - field_combine_dups(duplicate, prepend_comma, separator); + MIMEField *current = field->m_next_dup; + MIMEField *next = NULL; + while (current) { + next = current->m_next_dup; int value_len = 0; - const char *value_str = duplicate->value_get(&value_len); + const char *value_str = current->value_get(&value_len); if (value_len > 0) { field->value_append(m_heap, m_mime, value_str, value_len, prepend_comma, separator); } - field_delete(duplicate); + field_delete(current, false); // don't delete duplicates + current = next; } }
