Commit 0795b0fc authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix two bugs in esi parsing:

Ignore unknown include attributes and
Warn about src attributes without value



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2924 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d021dc5c
......@@ -277,10 +277,13 @@ esi_addinclude(struct esi_work *ew, txt t)
VSL(SLT_Debug, 0, "<%.*s> -> <%.*s>",
tag.e - tag.b, tag.b,
val.e - val.b, val.b);
if (Tlen(tag) != 3 && memcmp(tag.b, "src", 3))
if (Tlen(tag) != 3 || memcmp(tag.b, "src", 3))
continue;
if (Tlen(val) == 0) {
esi_error(ew, tag.b, Tlen(tag),
"ESI esi:include src attribute withou value");
continue;
assert(Tlen(val) > 0); /* XXX */
}
if (Tlen(val) > 7 && !memcmp(val.b, "http://", 7)) {
/* Rewrite to Host: header inplace */
......
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