Commit 06c9beb0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Concentrate the "Connection: close" logic in http1

parent f0e30c57
......@@ -299,9 +299,6 @@ cnt_transmit(struct worker *wrk, struct req *req)
VSLb_ts_req(req, "Resp", W_TIM_real(wrk));
if (http_HdrIs(req->resp, H_Connection, "close"))
req->doclose = SC_RESP_CLOSE;
if (req->objcore->flags & (OC_F_PRIVATE | OC_F_PASS)) {
if (boc != NULL) {
HSH_Abandon(req->objcore);
......
......@@ -101,7 +101,9 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
VSLb(req->vsl, SLT_Debug, "RES_MODE %x", req->res_mode);
if (req->doclose) {
if (!req->doclose && http_HdrIs(req->resp, H_Connection, "close")) {
req->doclose = SC_RESP_CLOSE;
} else if (req->doclose) {
if (!http_HdrIs(req->resp, H_Connection, "close")) {
http_Unset(req->resp, H_Connection);
http_SetHeader(req->resp, "Connection: close");
......
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