varnishtest "ESI commented include"


server s1 {
	rxreq
	txresp -body {
		<html>
		Before include
		<!--esi <esi:include src="/body"/> -->
		After include
	}
	rxreq
	expect req.url == "/body"
	txresp -body {
		Included file
	}
} -start

varnish v1 -vcl+backend {
	sub vcl_backend_response {
		if (bereq.url != "/body") {
			set beresp.do_esi = true;
		}
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.status == 200
	expect resp.bodylen == 67
}

client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 67
