vtest "Test req.hash_always_miss in vcl_recv"

server s1 {
	rxreq
	txresp -hdr "Inc: 1"
	rxreq
	txresp -hdr "Inc: 2"
} -start

vinyl v1 -vcl+backend {
	sub vcl_recv {
		if (req.http.x-missit == "1") {
			set req.hash_always_miss = true;
		}
	}
 } -start

client c1 {
	txreq -url "/"
	rxresp
	expect resp.status == 200
	expect resp.http.Inc == "1"
	txreq -url "/"
	rxresp
	expect resp.status == 200
	expect resp.http.Inc == "1"
	txreq -url "/" -hdr "x-missit: 1"
	rxresp
	expect resp.status == 200
	expect resp.http.Inc == "2"
	txreq -url "/"
	rxresp
	expect resp.status == 200
	expect resp.http.Inc == "2"
} -run
