Commit 65a2c005 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a Vary testcase



git-svn-id: http://www.varnish-cache.org/svn/trunk@2809 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a265a43f
# $Id$
test "Test Vary functionality"
varnish v1 -arg "-b 127.0.0.1:9080" -start
server s1 {
rxreq
expect req.http.foobar == "1"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 1" -hdr "Content-Length: 5" -body "1111\n"
rxreq
expect req.http.foobar == "2"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 2" -hdr "Content-Length: 5" -body "2222\n"
rxreq
expect req.http.foobar == "3"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 3" -hdr "Content-Length: 5" -body "3333\n"
rxreq
expect req.http.foobar == "4"
txresp -hdr "Vary: Foobar" -hdr "Snafu: 4" -hdr "Content-Length: 5" -body "4444\n"
} -start
client c1 {
txreq -hdr "Foobar: 1"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1001"
expect resp.http.snafu == "1"
txreq -hdr "Foobar: 2"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1002"
expect resp.http.snafu == "2"
txreq -hdr "Foobar: 3"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1003"
expect resp.http.snafu == "3"
txreq -hdr "Foobar: 4"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1004"
expect resp.http.snafu == "4"
txreq -hdr "Foobar: 1"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1005 1001"
expect resp.http.snafu == "1"
}
client c1 -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