From: phk Date: Tue, 3 Feb 2009 10:47:29 +0000 (+0000) Subject: The esi detector should also spot esi comments. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ce37b72abe04297198819cda2dc9c432b02c22b;p=varnish The esi detector should also spot esi comments. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3567 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 4fde71ee..4e1af4f0 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_vrt_esi.c @@ -615,6 +615,8 @@ esi_parse(struct esi_work *ew) { char *p; +printf("{%.*s}\n", Tlen(ew->t), ew->t.b); +usleep(100000); if (params->esi_syntax & 0x4) VSL(SLT_Debug, ew->sp->fd, "Parse: %d <%.*s>", Tlen(ew->t), Tlen(ew->t), ew->t.b); @@ -662,21 +664,25 @@ static int contain_esi(struct object *obj) { struct storage *st; unsigned u; - const char *r; + const char *r, *r2; static const char *wanted = "store, list) { AN(st); for (u = 0; u < st->len; u++) { if (st->ptr[u] != *r) { r = wanted; - continue; - } - if (*++r == '\0') + } else if (*++r == '\0') + return (1); + if (st->ptr[u] != *r2) { + r2 = wanted2; + } else if (*++r2 == '\0') return (1); } }