Commit bdc88fbb authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Tollef Fog Heen

Honor remove-flag also when processing comments in ESI parsing.

Fixes: #1092
parent a94b3a11
......@@ -705,7 +705,6 @@ VEP_parse(const struct sess *sp, const char *p, size_t l)
vep->until_p = vep->until = "-->";
vep->until_s = VEP_NEXTTAG;
vep->state = VEP_UNTIL;
vep_mark_verbatim(vep, p);
break;
}
p++;
......
varnishtest "Test case for #1092 - esi:remove and comments"
server s1 {
rxreq
txresp -body {
<html>
Keep-1
<!--esX Keep-22 -->
<!--esi Keep-333 -->
<esi:remove>
Remove-1
<!-- Remove-22 -->
<!--esi Remove-333 -->
Remove-4444
</esi:remove>
Keep-4444
</html>
}
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.do_esi = true;
}
} -start -cliok "param.set esi_syntax 4"
client c1 {
txreq
rxresp
expect resp.bodylen == 80
}
client c1 -run
varnish v1 -expect esi_errors == 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment