vtest "Make sure that PASS'ed ESI requests use GET for includes"

server s1 {
	rxreq
	expect req.method == POST
	expect req.url == /foobar
	txresp -body {<HTML>
		FOO
		<esi:include src="/bar"/>
	}
	rxreq
	expect req.method == GET
	txresp -hdr "Set-Cookie: Foo=bar" -body {<HTML>
		BAR
	}
} -start

vinyl v1 -vcl+backend {
	sub vcl_backend_response {
		set beresp.uncacheable = true;
		set beresp.do_esi = true;
	}
} -start

client c1 {
	txreq -req POST -url /foobar -body {
		A debugged program is one for which you have
		not yet found the conditions that make it fail.
			-- Jerry Ogdin
	}
	rxresp
	expect resp.status == 200
	expect resp.bodylen == 31
} -run
vinyl v1 -expect esi_errors == 0
