[master] ba78ebeb2 doc: Mention the effect of Connection:close in beresp

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Sep 11 08:37:08 UTC 2020


commit ba78ebeb28105290bef56008f52bf63e58d5a894
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Sep 8 11:51:06 2020 +0200

    doc: Mention the effect of Connection:close in beresp

diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst
index 4985fb7a1..38cb23e16 100644
--- a/doc/sphinx/whats-new/changes-trunk.rst
+++ b/doc/sphinx/whats-new/changes-trunk.rst
@@ -38,6 +38,25 @@ Changes to VCL
 VCL variables
 ~~~~~~~~~~~~~
 
+It is now possible to manually set a ``Connection: close`` header in
+``beresp`` to signal that the backend connection shouldn't be recycled.
+This might help dealing with backends that would under certain circumstances
+have trouble managing their end of the connection, for example for certain
+kinds of resources.
+
+Care should be taken to preserve other headers listed in the connection
+header::
+
+    sub vcl_backend_response {
+        if (beresp.backend == faulty_backend) {
+            if (beresp.http.Connection) {
+                set beresp.http.Connection += ", close";
+            } else {
+                set beresp.http.Connection = "close";
+            }
+        }
+    }
+
 **XXX new, deprecated or removed variables, or changed semantics**
 
 Other changes to VCL


More information about the varnish-commit mailing list