varnishtest "Test banning a url"

server s1 {
	rxreq
	expect req.url == "/foo"
	txresp -body "1111\n"
	rxreq
	expect req.url == "/foo"
	txresp -body "11111\n"
} -start

varnish v1 -vcl+backend { } -start

client c1 {
	txreq -url "/foo"
	rxresp
	expect resp.status == 200
	expect resp.bodylen == 5
}

client c1 -run

varnish v1 -cli "ban req.url ~ foo"

client c1 {
	txreq -url "/foo"
	rxresp
	expect resp.status == 200
	expect resp.bodylen == 6
}

client c1 -run
