r3736 - branches/2.0/varnish-cache/bin/varnishd
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Wed Feb 11 08:29:12 CET 2009
Author: tfheen
Date: 2009-02-11 08:29:12 +0100 (Wed, 11 Feb 2009)
New Revision: 3736
Modified:
branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Merge r3567: The esi detector should also spot esi comments.
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c 2009-02-11 07:25:54 UTC (rev 3735)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c 2009-02-11 07:29:12 UTC (rev 3736)
@@ -615,6 +615,8 @@
{
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,22 +664,26 @@
contain_esi(struct object *obj) {
struct storage *st;
unsigned u;
- const char *r;
+ const char *r, *r2;
static const char *wanted = "<esi:";
+ static const char *wanted2 = "<!--esi";
/*
* Do a fast check to see if there is any '<esi:' sequences at all
*/
r = wanted;
+ r2 = wanted2;
VTAILQ_FOREACH(st, &obj->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);
}
}
return (0);
More information about the varnish-commit
mailing list