vtest "hash key depends on argument form to hash_data()"

server s1 {
	rxreq
	txresp -hdr "OK: yes"
	rxreq
	txresp -hdr "OK: no"
} -start

vinyl v1 -vcl+backend {

	sub vcl_hash {
		if (req.http.foo == "1") {
			hash_data("123");
		} else {
			hash_data("1" + req.http.foo + "3");
		}
		return (lookup);
	}
} -start

vinyl v1 -cliok "param.set vsl_mask +Hash"

client c1 {
	txreq -hdr "foo: 1"
	rxresp
	expect resp.http.ok == "yes"

	txreq -hdr "foo: 2"
	rxresp
	expect resp.http.ok == "yes"
} -run
