You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2026/04/10 21:35:05 UTC
(trafficserver) branch 10.2.x updated: Fix broken default.com test case in targeted-cache-control (#13081)
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/10.2.x by this push:
new 0fe853ddf2 Fix broken default.com test case in targeted-cache-control (#13081)
0fe853ddf2 is described below
commit 0fe853ddf216ece0ac9ef1995c7efece951a6d58
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri Apr 10 15:34:59 2026 -0600
Fix broken default.com test case in targeted-cache-control (#13081)
* Fix broken default.com test case in targeted-cache-control
- Fix the default.com test case in targeted-cache-control.replay.yaml that was broken by the cherry-pick of #13054
- The original commit on master (67b96e58bb) added both the default.com remap rule, a priming request, and the verification request — but that commit was not cherry-picked to 10.2.x because the default targeted header change was considered a breaking change
- When #13054 was cherry-picked, it brought only the verification block without the remap rule or priming request, causing the test to always fail
- Add the default.com remap rule and priming request, and update the verification to expect a cache miss — on 10.2.x the default is no targeted headers, so Cache-Control: no-store should prevent caching even with CDN-Cache-Control: max-age=30 present
* Fix the fix
---
.../replay/targeted-cache-control.replay.yaml | 36 +++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/tests/gold_tests/cache/replay/targeted-cache-control.replay.yaml b/tests/gold_tests/cache/replay/targeted-cache-control.replay.yaml
index a472f5612d..1783e8bf6c 100644
--- a/tests/gold_tests/cache/replay/targeted-cache-control.replay.yaml
+++ b/tests/gold_tests/cache/replay/targeted-cache-control.replay.yaml
@@ -55,6 +55,9 @@ autest:
args:
- "proxy.config.http.cache.targeted_cache_control_headers=ACME-Cache-Control"
+ - from: "http://default.com/"
+ to: "http://backend.default.com:{SERVER_HTTP_PORT}/"
+
sessions:
- transactions:
@@ -246,6 +249,36 @@ sessions:
- [ Cache-Control, { value: "max-age=3600", as: equal } ]
- [ ACME-Cache-Control, { value: "no-store", as: equal } ]
+ #############################################################################
+ # Test 7: Global targeted headers apply without conf_remap override
+ #############################################################################
+ - client-request:
+ method: GET
+ url: /default/test1
+ version: '1.1'
+ headers:
+ fields:
+ - [Host, default.com]
+ - [uuid, default-test1-request1]
+
+ server-response:
+ status: 200
+ reason: OK
+ headers:
+ fields:
+ - [Content-Type, text/plain]
+ - [Content-Length, "14"]
+ - [Cache-Control, "no-store"]
+ - [CDN-Cache-Control, "max-age=30"]
+ - [Connection, close]
+
+ proxy-response:
+ status: 200
+ headers:
+ fields:
+ - [ Cache-Control, { value: "no-store", as: equal } ]
+ - [ CDN-Cache-Control, { value: "max-age=30", as: equal } ]
+
#############################################################################
# Now verify the correct cache behavior from above.
#############################################################################
@@ -266,7 +299,8 @@ sessions:
status: 404
reason: Not Found
- # Expect the cached 200 response due to default CDN-Cache-Control handling.
+ # Expect the cached 200 response because the global config sets
+ # CDN-Cache-Control as a targeted header, overriding Cache-Control: no-store.
proxy-response:
status: 200
headers: