Commit 138e67f6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

IMS decision is protocol-independent

parent 50fdfcfe
......@@ -242,13 +242,7 @@ V1D_Deliver(struct req *req)
if (req->res_mode & RES_GUNZIP)
http_Unset(req->resp, H_Content_Encoding);
if (!(req->obj->objcore->flags & OC_F_PASS)
&& req->obj->response == 200
&& req->http->conds && RFC2616_Do_Cond(req)) {
req->wantbody = 0;
http_SetResp(req->resp, "HTTP/1.1", 304, "Not Modified");
http_Unset(req->resp, H_Content_Length);
} else if (req->res_mode & RES_CHUNKED)
if (req->res_mode & RES_CHUNKED)
http_SetHeader(req->resp, "Transfer-Encoding: chunked");
http_SetHeader(req->resp,
......
......@@ -150,6 +150,14 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert(wrk->handling == VCL_RET_DELIVER);
if (!(req->obj->objcore->flags & OC_F_PASS)
&& req->obj->response == 200
&& req->http->conds && RFC2616_Do_Cond(req)) {
req->wantbody = 0;
http_SetResp(req->resp, "HTTP/1.1", 304, "Not Modified");
// http_Unset(req->resp, H_Content_Length);
}
V1D_Deliver(req);
/* No point in saving the body if it is hit-for-pass */
......
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