Commit 336c08d1 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

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: http://www.varnish-cache.org/svn/trunk/varnish-cache@1780 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 89af69c7
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment