caddy/modules
Adarsh Kumar 7165dca349
reverseproxy: retry dial errors wrapped by a forward proxy (#8264)
When a forward proxy is configured (network_proxy, forward_proxy_url or
HTTP_PROXY), net/http wraps dial errors in a *net.OpError with Op
"proxyconnect". tryAgain used a type assertion to detect DialError, so it
missed the wrapped error and treated it as a failure after the request
was sent. Non-GET requests were then not retried, even though no
connection to the proxy was ever established.

Use errors.As so a DialError is recognized anywhere in the error chain.
Errors that do not contain a DialError are unaffected, so requests that
may have reached the proxy or upstream are still not retried by default.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f355b8687d)
2026-11-03 00:53:19 -05:00
..
caddyevents events: tell CertMagic which events are worth emitting (#8010) 2026-10-03 01:03:20 +10:00
caddyfs events: Refactor; move Event into core, so core can emit events (#6930) 2025-03-29 08:15:43 -06:00
caddyhttp reverseproxy: retry dial errors wrapped by a forward proxy (#8264) 2026-11-03 00:53:19 -05:00
caddypki acmeserver: say when the CA database is locked by another process (#8007) 2026-09-11 14:49:31 +10:00
caddytls caddytls: skip client cert verifiers when no certificate is presented (#8251) 2026-11-03 00:53:19 -05:00
filestorage
internal/network network_proxy: reject proxy URLs that resolve to a port with no host (#7922) 2026-08-10 15:58:43 +10:00
logging logging: Parse request URIs in the query filter like the server does (#8255) 2026-11-03 00:53:19 -05:00
metrics metrics: scope metrics to active config, add optional per-host metrics (#6531) 2024-10-02 08:23:26 -06:00
standard