r2924 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jul 10 22:49:45 CEST 2008
Author: phk
Date: 2008-07-10 22:49:45 +0200 (Thu, 10 Jul 2008)
New Revision: 2924
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Fix two bugs in esi parsing:
Ignore unknown include attributes and
Warn about src attributes without value
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2008-07-10 20:25:40 UTC (rev 2923)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2008-07-10 20:49:45 UTC (rev 2924)
@@ -277,11 +277,14 @@
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 */
eb->host.b = val.b;
More information about the varnish-commit
mailing list