r2278 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Nov 20 21:41:19 CET 2007
Author: phk
Date: 2007-11-20 21:41:19 +0100 (Tue, 20 Nov 2007)
New Revision: 2278
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Storage border bug fixes
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2007-11-20 20:08:13 UTC (rev 2277)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2007-11-20 20:41:19 UTC (rev 2278)
@@ -354,6 +354,7 @@
ew->dst.b = t.b;
ew->dst.e = t.b;
ew->o.b = t.b;
+ ew->o.e = t.b;
for (p = t.b; p < t.e; ) {
if (ew->incmt && *p == '-') {
/*
@@ -442,9 +443,11 @@
/* Find end of this element */
for (q = p + 1; q < t.e && *q != '>'; q++)
continue;
- if (*q != '>')
+ if (q >= t.e || *q != '>')
return (p);
+
+VSL(SLT_Debug, ew->sp->fd, "Element: [%.*s]", q - p, p);
/* Opening/empty or closing element ? */
if (p[1] == '/') {
celem = 1;
@@ -544,6 +547,7 @@
}
/* Not an element we care about */
+ assert(q < t.e);
p = q + 1;
}
assert(p == t.e);
@@ -561,7 +565,7 @@
assert(ew->o.b >= ew->t.b);
assert(ew->o.e <= ew->t.e);
ew->o.e = p;
- if (Tlen(ew->o))
+ if (Tlen(ew->o) && !ew->remflg)
esi_addverbatim(ew);
if (Tlen(ew->dst))
esi_addbit(ew);
More information about the varnish-commit
mailing list