r4975 - in trunk/varnish-cache/bin: varnishd varnishtest/tests

phk at varnish-cache.org phk at varnish-cache.org
Mon Jun 21 10:15:12 CEST 2010


Author: phk
Date: 2010-06-21 10:15:11 +0200 (Mon, 21 Jun 2010)
New Revision: 4975

Modified:
   trunk/varnish-cache/bin/varnishd/cache_esi.c
   trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc
Log:
Fix a bug when ESI elements span storage elements, which only the
tightfisted -smalloc would trigger.

Fixes: #719



Modified: trunk/varnish-cache/bin/varnishd/cache_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_esi.c	2010-06-21 08:01:16 UTC (rev 4974)
+++ trunk/varnish-cache/bin/varnishd/cache_esi.c	2010-06-21 08:15:11 UTC (rev 4975)
@@ -622,8 +622,8 @@
 		 * XXX: Ideally, we should only pull together the bits
 		 * XXX: we need, like the filename.
 		 */
-		ew->tag.b = ew->sp->obj->ws_o->f;
-		ew->tag.e = ew->tag.b + WS_Reserve(ew->sp->obj->ws_o, 0);
+		ew->tag.b = ew->sp->wrk->ws->f;
+		ew->tag.e = ew->tag.b + WS_Reserve(ew->sp->wrk->ws, 0);
 		px = ew->s;
 		q = ew->tag.b;
 		while (px.p != ew->p.p) {
@@ -632,7 +632,7 @@
 			Nep(&px);
 		}
 		ew->tag.e = q;
-		WS_Release(ew->sp->obj->ws_o, Tlen(ew->tag));
+		WS_Release(ew->sp->wrk->ws, Tlen(ew->tag));
 	}
 	ll = Tlen(ew->tag);
 	ew->tag.b++;

Modified: trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc	2010-06-21 08:01:16 UTC (rev 4974)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00007.vtc	2010-06-21 08:15:11 UTC (rev 4975)
@@ -31,7 +31,7 @@
 	}
 } -start
 
-varnish v1 -vcl+backend {
+varnish v1 -storage "-smalloc,2m" -vcl+backend {
 	sub vcl_fetch {
 		esi;
 	}




More information about the varnish-commit mailing list