Commit db3fde87 authored by Łukasz Nowak's avatar Łukasz Nowak

component/trafficserver: Pick up duplicate header fix

The fix for https://github.com/apache/trafficserver/issues/11784 is ready
for 9 branch in https://github.com/apache/trafficserver/pull/11835 , so use
the patch directly until new version is released.
parent 0af80260
...@@ -46,6 +46,7 @@ patch-options = -p1 ...@@ -46,6 +46,7 @@ patch-options = -p1
patches = patches =
${:_profile_base_location_}/trafficserver-9.1.1-TSHttpTxnCacheLookupStatusGet-fix.patch#d8ed3db3a48e97eb72aaaf7d7598a2d2 ${:_profile_base_location_}/trafficserver-9.1.1-TSHttpTxnCacheLookupStatusGet-fix.patch#d8ed3db3a48e97eb72aaaf7d7598a2d2
${:_profile_base_location_}/trafficserver-9.1.1-via-string-rapid-cdn.patch#8c39243d7525222385d5964485734f99 ${:_profile_base_location_}/trafficserver-9.1.1-via-string-rapid-cdn.patch#8c39243d7525222385d5964485734f99
${:_profile_base_location_}/trafficserver-9.2.5-duplicate-header.patch#49246720f824e0b9fccb13dbd4ba49b7
environment = environment =
PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${luajit:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -lm LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${luajit:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -lm
......
diff -ur trafficserver-9.2.5.old/proxy/http/HttpTransact.cc trafficserver-9.2.5/proxy/http/HttpTransact.cc
--- trafficserver-9.2.5.old/proxy/http/HttpTransact.cc 2024-07-23 23:42:39.000000000 +0200
+++ trafficserver-9.2.5/proxy/http/HttpTransact.cc 2024-11-04 16:26:40.842379904 +0100
@@ -5123,6 +5123,17 @@
MIMEField &field2{*spot2};
name2 = field2.name_get(&name_len2);
+ // It is specified above that content type should not
+ // be altered here however when a duplicate header
+ // is present, all headers following are delete and
+ // re-added back. This includes content type if it follows
+ // any duplicate header. This leads to the loss of
+ // content type in the client response.
+ // This ensures that it is not altered when duplicate
+ // headers are present.
+ if (name2 == MIME_FIELD_CONTENT_TYPE) {
+ continue;
+ }
cached_header->field_delete(name2, name_len2);
}
dups_seen = true;
Only in trafficserver-9.2.5/tests/gold_tests/headers: cachedDuplicateHeaders.test.py
Only in trafficserver-9.2.5/tests/gold_tests/headers/replays: cache-test.replay.yaml
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment