Mailing List Archive

r1780 - trunk/varnish-cache/bin/varnishd
Author: des
Date: 2007-07-28 12:03:29 +0200 (Sat, 28 Jul 2007)
New Revision: 1780

Modified:
trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Reverse the logic for sp->wantbody: assume it is always wanted unless
req.request is "HEAD". This is what broke the RePurge test case.

Ideally, sp->wantbody would be controllable by VCL.


Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-07-28 09:23:52 UTC (rev 1779)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-07-28 10:03:29 UTC (rev 1780)
@@ -726,8 +726,7 @@

VCL_recv_method(sp);

- sp->wantbody = (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "GET") ||
- !strcmp(sp->http->hd[HTTP_HDR_REQ].b, "POST"));
+ sp->wantbody = (strcmp(sp->http->hd[HTTP_HDR_REQ].b, "HEAD") != 0);
switch(sp->handling) {
case VCL_RET_LOOKUP:
/* XXX: discard req body, if any */