Skip to content

Commit 1a4b26b

Browse files
committed
chore: explainer comment for normalizeWebsocketHeaders
1 parent 63d8d4a commit 1a4b26b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

modules/caddyhttp/reverseproxy/reverseproxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,8 @@ func (h *Handler) proxyLoopIteration(r *http.Request, origReq *http.Request, w h
716716
// iteration of the proxy loop starts from the same base. If neither set of
717717
// operations is configured, r.Header is left unchanged. Transport operations
718718
// are applied before user operations, so the user's config wins.
719+
// normalizeWebsocketHeaders is a no-op unless Go-canonical WebSocket header
720+
// names are present, so it is safe to call for ordinary non-WebSocket requests.
719721
func (h *Handler) rebuildRequestHeaders(r *http.Request, reqHeader http.Header, reqHost string) {
720722
var userOps *headers.HeaderOps
721723
if h.Headers != nil {

0 commit comments

Comments
 (0)