r623 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Thu Aug 3 21:20:02 CEST 2006
Author: phk
Date: 2006-08-03 21:20:02 +0200 (Thu, 03 Aug 2006)
New Revision: 623
Modified:
trunk/varnish-cache/bin/varnishd/cache_fetch.c
Log:
Sanitycheck that the length of an object adds up, right when we
fetch it.
Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-08-03 11:46:52 UTC (rev 622)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-08-03 19:20:02 UTC (rev 623)
@@ -242,6 +242,17 @@
} else
cls = 0;
+ {
+ /* Sanity check fetch methods accounting */
+ struct storage *st;
+ unsigned uu;
+
+ uu = 0;
+ TAILQ_FOREACH(st, &sp->obj->store, list)
+ uu += st->len;
+ assert(uu == sp->obj->len);
+ }
+
http_CopyHttp(&sp->obj->http, hp);
if (http_GetHdr(vc->http, H_Connection, &b) && !strcasecmp(b, "close"))
More information about the varnish-commit
mailing list