[master] 2a1804216 http2: The client closing the connection is not an error

Nils Goroll nils.goroll at uplex.de
Mon Mar 3 16:52:03 UTC 2025


commit 2a18042168c9d66346007ac9f3f6b173a9eb6b01
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Feb 24 14:51:03 2025 +0100

    http2: The client closing the connection is not an error
    
    It is fine for a client to close the connection, we should say a friendly
    goodbye and log this as no error.
    
    Closes #4281
    Related to #4283

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index d7309913c..a6bdaee3c 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -1487,6 +1487,9 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 
 	h2e = NULL;
 	switch (hs) {
+	case HTC_S_EOF:
+		h2e = H2CE_NO_ERROR;
+		break;
 	case HTC_S_COMPLETE:
 		h2->sess->t_idle = VTIM_real();
 		if (h2->do_sweep)


More information about the varnish-commit mailing list