Repository navigation
Description
I noticed that trafficserver's parent proxy sometimes lost the 2nd and subsequent Cache-Control header lines when origin response have two or more Cache-Control header lines.
I confirmed that this behavior occurs when trafficserver is configured Hierarchical Caching , and this behavior don't occur when trafficserver isn't so.
For explaining about this behavior, I built trafficserver from latest source code ( commit: 75e7fc340a5de90c9453ebc8b5302a41a3f73ce8 ) on master branch, and did gold_tests on my repo ( nozomi1773/trafficserver-test-docker--multiple-cache-control-heders
).
The autest origin's response 2 Cache-Control line definitions are integrated into 1 Cache-Control line (It is a behavior of autest origin),
for that reason, I changed origin to nginx and ran this tests.
I confirmed that this behavior is reproducible on multi_cache_control_origin_is_nginx.test.py.
I entered "via" informations in this *.test.py file.
Could you check this behavior ?
logging information
I confirmed that this behavior occurs on version 8.0.3 too.
And I collected log on parent and child .
cqh_cache_control:%<{Cache-Control}cqh>
pqh_cache_control:%<{Cache-Control}pqh>
psh_cache_control:%<{Cache-Control}psh>
ssh_cache_control:%<{Cache-Control}ssh>
cssh_cache_control:%<{Cache-Control}cssh>
At the time of loss Cache-Control header lines, the following content was logging.
If origin have the following 2 Cache-Control lines.
Cache-Control: s-maxage=600, public
Cache-Control: no-cache
1st request was the following.
< Parent >
cqh_cache_control: -
pqh_cache_control: -
psh_cache_control: "s-maxage=600, public, no-cache"
ssh_cache_control: "s-maxage=600, public, no-cache"
cssh_cache_control: -
< Child >
cqh_cache_control: -
pqh_cache_control: -
psh_cache_control: "s-maxage=600, public, no-cache"
ssh_cache_control: "s-maxage=600, public, no-cache"
cssh_cache_control: -
2nd request was the following.
< Parent >
cqh_cache_control: -
pqh_cache_control: -
psh_cache_control: "s-maxage=600, public" ← NOTE: on Proxy Response header lost "no-cache"
ssh_cache_control: "s-maxage=600, public, no-cache"
cssh_cache_control: -
< Child >
cqh_cache_control: -
pqh_cache_control: -
psh_cache_control: "s-maxage=600, public"
ssh_cache_control: "s-maxage=600, public"
cssh_cache_control: "s-maxage=600, public"
Activity
zwoop commentedon Jun 28, 2019
@vmamidi Can you take a look please ?
SolidWallOfCode commentedon Jul 23, 2020
Looks like there's some code that's not checking for duplicate fields. There is a clear loss of information which is wrong.
ezelkow1 commentedon Sep 15, 2020
Yes thats exactly what it is. Im also not sure this is directly related to parent selection. Testing here when it gets to
HttpTransact::build_response,
So it gets stripped out in that function. The value passed in to the mime parsing there has both headers combined in the value but the length only covers the first one and doesnt know how to parse dupes
Just throwing this in here, still looking in to it