caddy/modules/caddyhttp/reverseproxy
Jay Hemnani 7c7456353e
reverseproxy: Only retry responses for expressions that use response data (#8168)
* reverseproxy: Only retry responses for expressions that use response data

Since #7569 every lb_retry_match set with an expression is evaluated against
upstream responses. An expression that only tests the request, such as
{http.request.method} == "POST", then matched every successful response:
the request was sent again to the next upstreams and the client got a 502
once retries ran out. Only treat expressions referencing {rp.*} placeholders
as response conditions.

* reverseproxy: Only count placeholders set from the response as response data

* reverseproxy: Read response placeholders from the checked expression

The expression matcher records the placeholder names its checked CEL
expression reads, so retry_match finds direct ph() calls and ignores
escaped placeholder text in string literals. A placeholder name only
known at evaluation time counts as response data.

* reverseproxy: Match response placeholder names exactly

Only the header placeholders are matched by prefix now, and both
upstream latency placeholders are listed. MatchExpression.Placeholders
returns a copy, so callers cannot change the provisioned matcher.
2026-10-10 07:22:32 +10:00
..
fastcgi fix: preserve FastCGI dial errors for retry (#8172) 2026-10-08 14:02:20 +10:00
forwardauth
active_health_test.go reverseproxy: replace only known placeholders in health check body (#8003) 2026-09-09 08:48:08 -06:00
addresses.go
addresses_test.go
admin.go
admin_test.go
ascii.go
ascii_test.go
buffering_test.go fastcgi: explain the 411 a body without a length gets (#7956) 2026-09-23 09:31:54 -06: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
copyresponse.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
dynamic_upstreams_test.go
extended_connect_test.go reverseproxy: Optionally detach stream (websockets) from config lifecycle (#7649) 2026-10-04 07:45:10 -04:00
headers_test.go reverseproxy: Keep own headers after 1xx responses (#8169) 2026-10-09 16:42:26 +10:00
healthchecks.go reverseproxy: replace only known placeholders in health check body (#8003) 2026-09-09 08:48:08 -06: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 build: bump all dependencies - (Go 1.26 floor) (#8056) 2026-09-30 10:54:12 -06:00
httptransport_test.go reverse_proxy with versions 3 silently ignores tls_trust_pool and verifies against the system roots (#8042) 2026-09-22 08:13:02 +10: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
prepare_request_bench_test.go
retries_test.go reverseproxy: Only retry responses for expressions that use response data (#8168) 2026-10-10 07:22:32 +10:00
reverseproxy.go reverseproxy: Only retry responses for expressions that use response data (#8168) 2026-10-10 07:22:32 +10:00
selectionpolicies.go reverseproxy: Don't panic in weighted_round_robin with fewer weights than upstreams (#8159) 2026-10-07 04:36:10 +00:00
selectionpolicies_test.go reverseproxy: Don't panic in weighted_round_robin with fewer weights than upstreams (#8159) 2026-10-07 04:36:10 +00:00
streaming.go reverseproxy: Keep streams attached when writer detachment fails (#8139) 2026-10-04 12:46:34 -04:00
streaming_test.go reverseproxy: Keep streams attached when writer detachment fails (#8139) 2026-10-04 12:46:34 -04:00
upstreams.go
upstreams_bench_test.go
upstreams_test.go