summaryrefslogtreecommitdiffstats
path: root/reg-tests/cache
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:11:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:11:10 +0000
commitcff6d757e3ba609c08ef2aaa00f07e53551e5bf6 (patch)
tree08c4fc3255483ad397d712edb4214ded49149fd9 /reg-tests/cache
parentAdding upstream version 2.9.7. (diff)
downloadhaproxy-cff6d757e3ba609c08ef2aaa00f07e53551e5bf6.tar.xz
haproxy-cff6d757e3ba609c08ef2aaa00f07e53551e5bf6.zip
Adding upstream version 3.0.0.upstream/3.0.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'reg-tests/cache')
-rw-r--r--reg-tests/cache/vary.vtc51
1 files changed, 51 insertions, 0 deletions
diff --git a/reg-tests/cache/vary.vtc b/reg-tests/cache/vary.vtc
index 6c8cedf..782a76c 100644
--- a/reg-tests/cache/vary.vtc
+++ b/reg-tests/cache/vary.vtc
@@ -91,6 +91,20 @@ server s1 {
-hdr "Content-Encoding: gzip" \
-bodylen 59
+ rxreq
+ expect req.url == "/origin-referer"
+ txresp -hdr "Vary: origin,referer" \
+ -hdr "Cache-Control: max-age=5" \
+ -hdr "Content-Encoding: gzip" \
+ -bodylen 60
+
+ rxreq
+ expect req.url == "/origin-referer"
+ txresp -hdr "Vary: origin,referer" \
+ -hdr "Cache-Control: max-age=5" \
+ -hdr "Content-Encoding: gzip" \
+ -bodylen 61
+
# Multiple Accept-Encoding headers
rxreq
expect req.url == "/multiple_headers"
@@ -366,6 +380,43 @@ client c1 -connect ${h1_fe_sock} {
expect resp.bodylen == 59
expect resp.http.X-Cache-Hit == 1
+ # Mixed Vary (origin + Referer)
+ txreq -url "/origin-referer" \
+ -hdr "Accept-Encoding: br, gzip" \
+ -hdr "Referer: referer" \
+ -hdr "Origin: origin"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 60
+ expect resp.http.X-Cache-Hit == 0
+
+ txreq -url "/origin-referer" \
+ -hdr "Accept-Encoding: br, gzip" \
+ -hdr "Referer: referer" \
+ -hdr "Origin: origin"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 60
+ expect resp.http.X-Cache-Hit == 1
+
+ txreq -url "/origin-referer" \
+ -hdr "Accept-Encoding: br, gzip" \
+ -hdr "Referer: other-referer" \
+ -hdr "Origin: other-origin"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 61
+ expect resp.http.X-Cache-Hit == 0
+
+ txreq -url "/origin-referer" \
+ -hdr "Accept-Encoding: br, gzip" \
+ -hdr "Referer: other-referer" \
+ -hdr "Origin: other-origin"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 61
+ expect resp.http.X-Cache-Hit == 1
+
# Multiple Accept-encoding headers
txreq -url "/multiple_headers" \
-hdr "Accept-Encoding: gzip" \