Commit 17dcc378 authored by Nils Goroll's avatar Nils Goroll

Add test for the empty and non-existing varied-upon header resulting in individual cache objects

Outcome of a discussion of the suggestion to treat empty headers like
non-existing for Vary processing:

https://www.varnish-cache.org/lists/pipermail/varnish-dev/2015-January/008131.html
parent 452852f6
......@@ -4,14 +4,22 @@ server s1 {
rxreq
expect req.http.foobar == "1"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 1" -body "1111\n"
rxreq
expect req.http.foobar == "2"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 2" -body "2222\n"
rxreq
expect req.http.foobar == "3"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 3" -body "3333\n"
rxreq
expect req.http.foobar == <undef>
txresp -hdr "Vary: Foobar" -hdr "Snafu: 4" -body "4444\n"
rxreq
expect req.http.foobar == ""
txresp -hdr "Vary: Foobar" -hdr "Snafu: 5" -body "5555\n"
} -start
varnish v1 -vcl+backend {} -start
......@@ -47,4 +55,17 @@ client c1 {
expect resp.http.X-Varnish == "1009 1002"
expect resp.http.snafu == "1"
txreq -hdr "Foobar: 1 "
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1010 1002"
expect resp.http.snafu == "1"
# empty header != no header
txreq -hdr "Foobar: "
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1011"
expect resp.http.snafu == "5"
} -run
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