From: des Date: Sat, 28 Jul 2007 10:03:29 +0000 (+0000) Subject: Reverse the logic for sp->wantbody: assume it is always wanted unless X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a749a448f1f7ff7ea9bcb872f96fb99e2cc6e6a7;p=varnish 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. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1780 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 46b4cefe..4ff45140 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -726,8 +726,7 @@ cnt_recv(struct sess *sp) 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 */