varnishtest "Regression test for 524: HTTP/1.0 and ESI"

server s1 {
	rxreq
	expect req.url == "/"
	txresp -proto HTTP/1.0 -body {
		<esi:remove> </esi:remove>
		<_esi:include src="/foo"/>
		<esi:remove> </esi:remove>
	}

} -start

varnish v1 -vcl+backend {
	sub vcl_recv {
		// return (pass);
	}
	sub vcl_backend_response {
		set beresp.do_esi = true;
	}
} -cliok "param.set timeout_idle 60" -start

client c1 {
	txreq -proto HTTP/1.1
	rxresp
	# XXX this is the problem:  expect resp.proto == HTTP/1.1
	expect resp.status == 200
	expect resp.bodylen == 37
} -run
