You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ez...@apache.org on 2020/09/21 15:21:27 UTC
[trafficserver] branch master updated: Add duplicate header field
processing when creating outgoing response (#7207)
This is an automated email from the ASF dual-hosted git repository.
eze 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 086908f Add duplicate header field processing when creating outgoing response (#7207)
086908f is described below
commit 086908fed45d98e170f8f026ec31ca7cebff59c4
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Mon Sep 21 09:21:07 2020 -0600
Add duplicate header field processing when creating outgoing response (#7207)
Currently when we are copying fields from a generated base response over
to our outgoing response we ignore duplicate fields. This can remove
entries from headers such as Cache-Control if they come in on multiple
header fields
---
proxy/http/HttpTransact.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 4fdb683..48202c6 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7846,6 +7846,14 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
ink_assert(field != nullptr);
value = field->value_get(&len);
outgoing_response->value_append(fields[i].name, fields[i].len, value, len, false);
+ if (field->has_dups()) {
+ field = field->m_next_dup;
+ while (field) {
+ value = field->value_get(&len);
+ outgoing_response->value_append(fields[i].name, fields[i].len, value, len, true);
+ field = field->m_next_dup;
+ }
+ }
}
}
}