Commit 1ba2a40f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Warn about XML/ESI language elements that are not properly closed.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2279 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 86b96d5b
......@@ -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 <esi:remove> element");
if (ew->incmt)
esi_error(ew, NULL, 0,
"ESI 1.0 unterminated <!--esi comment");
if (!ew->is_esi) {
ESI_Destroy(sp->obj);
return;
......
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