Commit c62d0b6b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't keep looking at req->obj->http once we have req->resp populated.

parent 4300c741
...@@ -93,7 +93,7 @@ v1d_dorange(struct req *req, struct busyobj *bo, const char *r) ...@@ -93,7 +93,7 @@ v1d_dorange(struct req *req, struct busyobj *bo, const char *r)
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC);
assert(http_GetStatus(req->obj->http) == 200); assert(http_GetStatus(req->resp) == 200);
/* We must snapshot the length if we're streaming from the backend */ /* We must snapshot the length if we're streaming from the backend */
if (bo != NULL) if (bo != NULL)
......
...@@ -163,7 +163,7 @@ cnt_deliver(struct worker *wrk, struct req *req) ...@@ -163,7 +163,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
if (!(req->objcore->flags & OC_F_PASS) if (!(req->objcore->flags & OC_F_PASS)
&& req->esi_level == 0 && req->esi_level == 0
&& http_GetStatus(req->obj->http) == 200 && http_GetStatus(req->resp) == 200
&& req->http->conds && RFC2616_Do_Cond(req)) { && req->http->conds && RFC2616_Do_Cond(req)) {
http_PutResponse(req->resp, "HTTP/1.1", 304, NULL); http_PutResponse(req->resp, "HTTP/1.1", 304, NULL);
req->wantbody = 0; req->wantbody = 0;
......
...@@ -363,7 +363,7 @@ RFC2616_Do_Cond(const struct req *req) ...@@ -363,7 +363,7 @@ RFC2616_Do_Cond(const struct req *req)
} }
if (http_GetHdr(req->http, H_If_None_Match, &p) && if (http_GetHdr(req->http, H_If_None_Match, &p) &&
http_GetHdr(req->obj->http, H_ETag, &e)) { http_GetHdr(req->resp, H_ETag, &e)) {
if (strcmp(p,e) != 0) if (strcmp(p,e) != 0)
return (0); return (0);
do_cond = 1; do_cond = 1;
......
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