From 43b77f1f071ccdff38b3ae7236a396436c8a5137 Mon Sep 17 00:00:00 2001 From: Tony Biondo Date: Wed, 15 Oct 2025 20:42:42 -0400 Subject: [PATCH] document that go-quic copies :protocol into r.Proto --- modules/caddyhttp/reverseproxy/reverseproxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 774013e72..bd561b53e 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -411,6 +411,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht } // websocket over http2 or http3, assuming backend doesn't support this, the request will be modified to http1.1 upgrade + // The go-quic http3 implementation also puts :protocol in r.Proto for CONNECT requests (quic-go/quic-go/headers.go@70-72,185,203) // TODO: once we can reliably detect backend support this, it can be removed for those backends if (r.ProtoMajor == 2 && r.Method == http.MethodConnect && r.Header.Get(":protocol") == "websocket") || (r.ProtoMajor == 3 && r.Method == http.MethodConnect && r.Proto == "websocket") {