Commit 5c4b0504 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix #326: Don't emit zerolength verbatim strings before esi:include



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3208 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a39f8c7d
......@@ -790,9 +790,11 @@ ESI_Deliver(struct sess *sp)
struct object *obj;
VTAILQ_FOREACH(eb, &sp->obj->esibits, list) {
WRK_Write(sp->wrk, eb->chunk_length, -1);
WRK_Write(sp->wrk, eb->verbatim.b, Tlen(eb->verbatim));
WRK_Write(sp->wrk, "\r\n", -1);
if (Tlen(eb->verbatim)) {
WRK_Write(sp->wrk, eb->chunk_length, -1);
WRK_Write(sp->wrk, eb->verbatim.b, Tlen(eb->verbatim));
WRK_Write(sp->wrk, "\r\n", -1);
}
if (eb->include.b == NULL ||
sp->esis >= params->max_esi_includes)
continue;
......
# $Id: e00008.vtc 3012 2008-07-24 12:22:35Z des $
test "No zerolength verbatim before <esi:include...>"
server s1 {
rxreq
txresp -body {<esi:include src="/foo"/><esi:include src="/foo"/>}
rxreq
txresp -body "FOO\n"
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
esi;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.bodylen == 8
} -run
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