You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/07/21 11:06:13 UTC
trafficserver git commit: TS-3595: Cookie header split into multiple
lines with H2 Updated the way the headers get copied,
so the source doesn't move
Repository: trafficserver
Updated Branches:
refs/heads/master bb6f9f34b -> acc4552b4
TS-3595: Cookie header split into multiple lines with H2
Updated the way the headers get copied, so the source doesn't move
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/acc4552b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/acc4552b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/acc4552b
Branch: refs/heads/master
Commit: acc4552b48d3055de72174833084773895688449
Parents: bb6f9f3
Author: Bryan Call <bc...@apache.org>
Authored: Tue Jul 21 11:05:33 2015 +0200
Committer: Bryan Call <bc...@apache.org>
Committed: Tue Jul 21 11:05:33 2015 +0200
----------------------------------------------------------------------
proxy/hdrs/MIME.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acc4552b/proxy/hdrs/MIME.h
----------------------------------------------------------------------
diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h
index 5589383..7b73429 100644
--- a/proxy/hdrs/MIME.h
+++ b/proxy/hdrs/MIME.h
@@ -1335,6 +1335,9 @@ MIMEHdr::field_combine_dups(MIMEField *field, bool prepend_comma, const char sep
MIMEField *current = field->m_next_dup;
MIMEField *next = NULL;
+ // clean up the heaps so we don't run this in the middle of appending and moving source location
+ m_heap->coalesce_str_heaps();
+
while (current) {
next = current->m_next_dup;
@@ -1343,9 +1346,13 @@ MIMEHdr::field_combine_dups(MIMEField *field, bool prepend_comma, const char sep
if (value_len > 0) {
field->value_append(m_heap, m_mime, value_str, value_len, prepend_comma, separator);
}
- field_delete(current, false); // don't delete duplicates
current = next;
}
+
+ // save the deletes to the end so we don't call coalesce_str_heaps in the middle of the appends
+ if (field->m_next_dup) {
+ field_delete(field->m_next_dup, true); // delete the duplicates
+ }
}
/*-------------------------------------------------------------------------