Commit c2e22e20 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Reverse the logic in r1997 from !is_get to is_head.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1998 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 67445851
...@@ -263,7 +263,7 @@ Fetch(struct sess *sp) ...@@ -263,7 +263,7 @@ Fetch(struct sess *sp)
struct http *hp, *hp2; struct http *hp, *hp2;
struct storage *st; struct storage *st;
struct bereq *bereq; struct bereq *bereq;
int len, mklen, is_get; int len, mklen, is_head;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
...@@ -272,7 +272,7 @@ Fetch(struct sess *sp) ...@@ -272,7 +272,7 @@ Fetch(struct sess *sp)
w = sp->wrk; w = sp->wrk;
bereq = sp->bereq; bereq = sp->bereq;
hp = bereq->http; hp = bereq->http;
is_get = !strcasecmp(http_GetReq(hp), "get"); is_head = (strcasecmp(http_GetReq(hp), "head") == 0);
sp->obj->xid = sp->xid; sp->obj->xid = sp->xid;
...@@ -286,7 +286,6 @@ Fetch(struct sess *sp) ...@@ -286,7 +286,6 @@ Fetch(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->backend, BACKEND_MAGIC); CHECK_OBJ_NOTNULL(sp->backend, BACKEND_MAGIC);
if (WRK_Flush(w)) { if (WRK_Flush(w)) {
/* XXX: cleanup */ /* XXX: cleanup */
return (1); return (1);
} }
...@@ -342,7 +341,7 @@ Fetch(struct sess *sp) ...@@ -342,7 +341,7 @@ Fetch(struct sess *sp)
/* Determine if we have a body or not */ /* Determine if we have a body or not */
cls = 0; cls = 0;
mklen = 0; mklen = 0;
if (!is_get) { if (is_head) {
/* nothing */ /* nothing */
} else if (http_GetHdr(hp, H_Content_Length, &b)) { } else if (http_GetHdr(hp, H_Content_Length, &b)) {
cls = fetch_straight(sp, vc->fd, hp, b); cls = fetch_straight(sp, vc->fd, hp, b);
......
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