varnishtest "ESI CDATA"


server s1 {
	rxreq
	txresp -body {
		<esi:remove>
		<![CDATA[</esi:remove>]]>
		This is a test: Unseen University
		</esi:remove>
		This is a test: Hello world
	}
} -start

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

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

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