mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00:00
document that go-quic copies :protocol into r.Proto
This commit is contained in:
parent
d474fbd3aa
commit
43b77f1f07
1 changed files with 1 additions and 0 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue