From: phk Date: Tue, 20 Nov 2007 21:01:00 +0000 (+0000) Subject: Warn about XML/ESI language elements that are not properly closed. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cefddbb624e548566dc60aee789a7a6a59c009ac;p=varnish Warn about XML/ESI language elements that are not properly closed. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2279 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_vrt_esi.c b/varnish-cache/bin/varnishd/cache_vrt_esi.c index 2b73b0a6..475d7c4d 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_vrt_esi.c @@ -625,7 +625,12 @@ VRT_ESI(struct sess *sp) * XXX: all of it, or do we leave the final * XXX: element dangling ? */ - INCOMPL(); + esi_error(ew, p, ew->t.e -p, + "XML 1.0 incomplete language element"); + ew->dst.b = p; + ew->dst.e = ew->t.e; + esi_addbit(ew); + break; } /* Move remainder to workspace */ @@ -660,6 +665,13 @@ VRT_ESI(struct sess *sp) /* 'p' is cached starting point for next storage part */ } + if (ew->remflg) + esi_error(ew, NULL, 0, + "ESI 1.0 unterminated element"); + if (ew->incmt) + esi_error(ew, NULL, 0, + "ESI 1.0 unterminated