mirror of
https://github.com/caddyserver/caddy.git
synced 2026-11-17 13:29:35 +00:00
* 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.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| fastcgi | ||
| forwardauth | ||
| active_health_test.go | ||
| addresses.go | ||
| addresses_test.go | ||
| admin.go | ||
| admin_test.go | ||
| ascii.go | ||
| ascii_test.go | ||
| buffering_test.go | ||
| caddyfile.go | ||
| client_disconnect_test.go | ||
| command.go | ||
| copyresponse.go | ||
| dynamic_upstreams_test.go | ||
| headers_test.go | ||
| healthchecks.go | ||
| hopheaders_test.go | ||
| hosts.go | ||
| httptransport.go | ||
| httptransport_test.go | ||
| incremental_test.go | ||
| metrics.go | ||
| passive_health_test.go | ||
| prepare_request_bench_test.go | ||
| retries_test.go | ||
| reverseproxy.go | ||
| selectionpolicies.go | ||
| selectionpolicies_test.go | ||
| streaming.go | ||
| streaming_test.go | ||
| upstreams.go | ||
| upstreams_bench_test.go | ||
| upstreams_test.go | ||