]> err.no Git - varnish/commitdiff
Reverse the logic for sp->wantbody: assume it is always wanted unless
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 28 Jul 2007 10:03:29 +0000 (10:03 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 28 Jul 2007 10:03:29 +0000 (10:03 +0000)
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

varnish-cache/bin/varnishd/cache_center.c

index 46b4cefee61cf7a273390b6ea101216c6bc000b4..4ff451407f5de66fd071e6c91e3751cdc9ef13d1 100644 (file)
@@ -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 */