caddy/modules/caddyhttp/reverseproxy
SapirBaruch 8ccfcbc571 reverseproxy: re-apply WebSocket header normalization after header ops
When transport or user header ops are configured, proxyLoopIteration
rebuilds r.Header from scratch using copyHeader. copyHeader calls
http.Header.Add internally which canonicalizes header names via
CanonicalHeaderKey — this lowercases the 'S' in WebSocket, turning
"Sec-WebSocket-Key" into "Sec-Websocket-Key".

normalizeWebsocketHeaders was already called in prepareRequest to fix
this, but the subsequent header rebuild in proxyLoopIteration undoes
it. Calling normalizeWebsocketHeaders again after the rebuild restores
the RFC 6455-compliant casing for all Sec-WebSocket-* headers.

Fixes #7784
2026-06-01 21:33:30 +03:00
..
fastcgi Merge commit from fork 2026-05-29 11:37:17 -06:00
forwardauth forward_auth: copy_headers does not strip client-supplied identity headers (Fixes GHSA-7r4p-vjf4-gxv4) (#7545) 2026-03-03 23:30:49 -05:00
addresses.go core: Implement socket activation listeners (#6573) 2024-09-30 10:55:03 -06:00
addresses_test.go reverseproxy: do not parse upstream address too early if it contains replaceble parts (#5695) 2023-08-05 23:30:02 +02:00
admin.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
admin_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
ascii.go reverseproxy: Sync up handleUpgradeResponse with stdlib (#4664) 2022-04-11 12:49:56 -06:00
ascii_test.go filesystem: Globally declared filesystems, fs directive (#5833) 2024-01-13 20:12:43 +00:00
buffering_test.go reverseproxy: more comments about buffering and add new tests (#6778) 2025-03-07 11:22:43 -07:00
caddyfile.go reverseproxy: add lb_retry_match condition on response status (#7569) 2026-04-21 14:59:31 -04:00
command.go cmd: prevent commas in header values from being split (#7268) 2025-09-22 21:12:06 -06:00
copyresponse.go reverseproxy: Fix double headers in response handlers (#4847) 2022-06-22 15:10:14 -04:00
dynamic_upstreams_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
headers_test.go chore: replace interface{} with any for modernization (#7571) 2026-04-11 19:53:12 +03:00
healthchecks.go chore: clean up wording and typo fixes (#7745) 2026-05-20 16:36:30 +10:00
hosts.go admin: Redact sensitive request headers in API logs (#7578) 2026-04-17 14:56:42 -06:00
httptransport.go Wire up Cause for most context cancels (#7538) 2026-03-04 17:14:52 -07:00
httptransport_test.go reverseproxy: Add regression test for DialInfo network override (#7758) 2026-05-20 09:43:58 -04:00
metrics.go reverseproxy: ignore duplicate collector registration error (#6820) 2025-02-04 10:55:30 +03:00
passive_health_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
retries_test.go reverseproxy: further prevent body closes from dial errors (#7715) 2026-05-12 12:05:50 -06:00
reverseproxy.go reverseproxy: re-apply WebSocket header normalization after header ops 2026-06-01 21:33:30 +03:00
selectionpolicies.go chore: Fix golangci-lint 2.12.1 findings (#7690) 2026-05-07 03:40:26 -04:00
selectionpolicies_test.go chore: clean up wording and typo fixes (#7745) 2026-05-20 16:36:30 +10:00
streaming.go reverseproxy: make stream copy buffer size configurable (#7627) 2026-04-10 14:49:32 -06:00
streaming_test.go reverseproxy: make stream copy buffer size configurable (#7627) 2026-04-10 14:49:32 -06:00
upstreams.go reverseproxy: Add ability to clear dynamic upstreams cache during retries (#7662) 2026-04-28 09:16:18 -06:00
upstreams_test.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00