varnishtest "Test that inter-request whitespace trimming works"

server s1 {
	rxreq
	txresp \
		-hdr "Connection: close" \
		-body "012345\n"
} -start

varnish v1 -arg "-p timeout_linger=20" -vcl+backend { } -start

client c1 {
	send "GET / HTTP/1.1\r\nHost: foo\r\n\r\n\r\n"

	rxresp
	expect resp.status == 200
	expect resp.http.X-Varnish == "1001"

	send "GET / HTTP/1.1\r\nHost: foo\r\n\r\n"
	rxresp
	expect resp.status == 200
	expect resp.http.X-Varnish == "1003 1002"
}

client c1 -run
