vtest "ESI test with no ESI content"


server s1 {
	rxreq
	txresp -body {
		-This is a test: Hello world
	}
} -start

vinyl v1 -vcl+backend {
	sub vcl_backend_response {
		set beresp.do_esi = true;
	}
	sub vcl_deliver {
		set resp.http.can_esi = obj.can_esi;
	}
} -start

logexpect l1 -v v1 -g raw {
	expect * * ESI_xmlerror esi_disable_xml_check
} -start

client c1 {
	txreq
	rxresp
	expect resp.status == 200
	expect resp.bodylen == 33
	expect resp.http.can_esi == "false"
}

client c1 -run
logexpect l1 -wait
vinyl v1 -expect esi_errors == 0
vinyl v1 -expect MAIN.s_resp_bodybytes == 33
