[master] 7c1806b98 req_fsm: Take vcl added "Connection:close" into account in synth

Walid Boudebouda walid.boudebouda at gmail.com
Mon Sep 1 13:21:06 UTC 2025


commit 7c1806b98e98e59b936dcc0fecf845ab6d5aa114
Author: Walid Boudebouda <walid.boudebouda at gmail.com>
Date:   Fri Aug 29 18:50:21 2025 +0200

    req_fsm: Take vcl added "Connection:close" into account in synth

diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 43cb18006..50d726845 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -376,7 +376,8 @@ cnt_synth(struct worker *wrk, struct req *req)
 	    VSB_len(synth_body));
 
 	if (req->doclose == SC_NULL &&
-	    http_HdrIs(req->resp, H_Connection, "close"))
+	    (http_HdrIs(req->resp, H_Connection, "close") ||
+	    http_HdrIs(req->http, H_Connection, "close")))
 		req->doclose = SC_RESP_CLOSE;
 
 	/* Discard any lingering request body before delivery */


More information about the varnish-commit mailing list