Commit e36573e2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a test-case for hash_data() in vcl_recv{}

parent 03fe0cee
varnishtest "hash_data() in vcl_recv{}"
server s1 {
rxreq
txresp -hdr "Same: One"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
if (req.url == "/2") {
hash_data(req.http.foo);
}
}
sub vcl_hash {
hash_data(req.url);
return (lookup);
}
} -start
varnish v1 -cliok "param.set vsl_mask +Hash"
client c1 {
txreq -url /1
rxresp
expect resp.status == 200
expect resp.http.same == One
txreq -url /2 -hdr "foo: /1"
rxresp
expect resp.status == 200
expect resp.http.same == One
} -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