Commit 128ca35f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

remove a couple of pointless copies of the HTTP status.

Pick it out of struct http when needed.
parent ed7b3105
......@@ -524,7 +524,6 @@ struct busyobj {
int retries;
unsigned refcount;
double t_fetch;
uint16_t err_code;
struct req *req;
uint8_t *vary;
......@@ -591,7 +590,6 @@ struct object {
struct objcore *objcore;
uint8_t *vary;
uint16_t response;
/* XXX: make bitmap */
uint8_t gziped;
......
......@@ -142,7 +142,6 @@ vbf_bereq2obj(struct worker *wrk, struct busyobj *bo)
}
obj->vxid = bo->vsl->wid;
obj->response = bo->err_code;
WS_Assert(bo->ws_o);
/* Filter into object */
......@@ -331,8 +330,6 @@ vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
*/
bo->htc.body_status = RFC2616_Body(bo, &wrk->stats);
bo->err_code = http_GetStatus(bo->beresp);
/*
* What does RFC2616 think about TTL ?
*/
......
......@@ -93,7 +93,7 @@ v1d_dorange(struct req *req, const char *r)
ssize_t low, high, has_low;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
assert(req->obj->response == 200);
assert(http_GetStatus(req->obj->http) == 200);
if (strncmp(r, "bytes=", 6))
return;
r += 6;
......@@ -271,7 +271,7 @@ V1D_Deliver(struct req *req)
req->wantbody &&
!(req->res_mode & (RES_ESI|RES_ESI_CHILD)) &&
cache_param->http_range_support &&
req->obj->response == 200) {
http_GetStatus(req->obj->http) == 200) {
http_SetHeader(req->resp, "Accept-Ranges: bytes");
if (http_GetHdr(req->http, H_Range, &r))
v1d_dorange(req, r);
......
......@@ -147,7 +147,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
if (!(req->obj->objcore->flags & OC_F_PASS)
&& req->esi_level == 0
&& req->obj->response == 200
&& http_GetStatus(req->obj->http) == 200
&& req->http->conds && RFC2616_Do_Cond(req))
http_SetResp(req->resp, "HTTP/1.1", 304, "Not Modified");
......@@ -304,7 +304,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
req->obj = oc_getobj(&wrk->stats, req->objcore);
req->objcore = NULL;
req->err_code = req->obj->response;
req->err_code = http_GetStatus(req->obj->http);
req->req_step = R_STP_DELIVER;
return (REQ_FSM_MORE);
}
......
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