caddy/modules/caddyhttp/reverseproxy
Chris Oliver 553b62c3f3
reverseproxy: send every close message before closing tunnel connections (#8371)
Closing one side of a tunnel ends its copy loops, which close the other
side. closeConnectionsLocked sent each close message and closed that
connection before moving on, in map order, so when the client side came
first the upstream was often closed before its close message went out.
Send every close message in the batch first, then close the connections.

The second close then regularly finds the connection already closed.
Treat net.ErrClosed as expected instead of returning it, so reloads with
open websockets no longer log "use of closed network connection" at
ERROR level.

The upstream close message test goes back to running the real cleanup,
which it can now do reliably.
2026-11-08 11:05:28 +00:00
..
fastcgi fastcgi: reject paths whose escaped form selects another script (#8357) 2026-11-04 18:02:42 -05:00
forwardauth forwardauth: error on duplicate uri subdirective (#7814) 2026-06-10 23:31:04 -04:00
active_health_test.go Revert #8223 2026-10-17 15:28:01 +08:00
addresses.go core: Implement socket activation listeners (#6573) 2024-09-30 10:55:03 -06:00
addresses_test.go
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
ascii_test.go
buffering_test.go reverseproxy: Don't drop read errors with unlimited buffers (#8207) 2026-10-14 00:25:34 +10:00
caddyfile.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
client_disconnect_test.go reverseproxy: log HTTP/3 client cancellations at debug level (#8135) 2026-10-04 12:48:06 +00:00
command.go cmd: prevent commas in header values from being split (#7268) 2025-09-22 21:12:06 -06:00
copyresponse.go reverseproxy: strip hop-by-hop headers when copying response headers (#8270) 2026-10-26 09:21:29 +00:00
copyresponse_test.go reverseproxy: strip hop-by-hop headers when copying response headers (#8270) 2026-10-26 09:21:29 +00:00
dynamic_upstreams_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
extended_connect_test.go reverseproxy: simplify WebSocket header handling (#8365) 2026-11-05 04:45:23 -05:00
handleresponse_test.go reverseproxy: close upstream body when handle_response status is invalid (#8318) 2026-11-03 06:58:00 +00:00
headers_test.go reverseproxy: strip hop-by-hop headers from interim responses (#8256) 2026-10-20 17:11:30 +10:00
healthchecks.go Revert #8223 2026-10-17 15:28:01 +08:00
hopheaders_test.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
hosts.go reverseproxy: isolate active health-check state per distinct check config (#7916) 2026-08-12 15:20:15 +10:00
httptransport.go caddytls: validate curve and protocol names, compare protocol IDs (#8266) 2026-10-26 20:14:59 +00:00
httptransport_test.go caddytls: validate curve and protocol names, compare protocol IDs (#8266) 2026-10-26 20:14:59 +00:00
incremental_test.go feat: implement the Incremental header field (RFC 10036) (#8020) 2026-10-02 20:59:34 -04:00
metrics.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
metrics_test.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
passive_health_test.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
prepare_request_bench_test.go reverseproxy: reduce allocation/CPU overhead in request hot paths (#7925) 2026-08-10 15:49:55 +10:00
request_trailers_test.go reverseproxy: preserve request trailer values (#8246) 2026-10-19 09:16:58 +00:00
retries_test.go reverseproxy: retry dial errors wrapped by a forward proxy (#8264) 2026-10-21 11:49:32 +00:00
reverseproxy.go reverseproxy: set a write deadline on websocket close messages (#8309) 2026-11-06 10:49:16 +00:00
selectionpolicies.go caddyhttp: presize buffers in hot paths to reduce allocations (#7842) 2026-11-04 20:26:53 +00:00
selectionpolicies_bench_test.go caddyhttp: presize buffers in hot paths to reduce allocations (#7842) 2026-11-04 20:26:53 +00:00
selectionpolicies_test.go reverseproxy: skip unavailable upstream with a single weighted_round_robin weight (#8320) 2026-11-03 07:01:28 +00:00
streaming.go reverseproxy: send every close message before closing tunnel connections (#8371) 2026-11-08 11:05:28 +00:00
streaming_test.go reverseproxy: send every close message before closing tunnel connections (#8371) 2026-11-08 11:05:28 +00:00
tracing_test.go reverseproxy: emit OpenTelemetry client spans (#8177) 2026-10-23 16:28:55 +10:00
upstreams.go reverseproxy: reduce lock contention in dynamic SRV and A upstreams (#7949) 2026-11-03 08:37:50 +00:00
upstreams_bench_test.go reverseproxy: preallocate upstream slices with known sizes (#7926) 2026-08-10 15:51:50 +10:00
upstreams_test.go reverseproxy: make the shared DNS discovery cache resolver-aware (#8252) 2026-10-31 17:23:41 -04:00
webtransport_pump.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
webtransport_pump_test.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
webtransport_transport.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
webtransport_transport_test.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00