This commit is contained in:
yhirose committed 2026-05-25 00:21:57 -04:00
1 parent 4c4b62dd7e
commit d278f965cc
2 files changed
+183 -4

No files matched your search

+6 -4
View File
@@ -13200,10 +13200,12 @@ inline bool ClientImpl::handle_request(Stream &strm, Request &req,
req.authorization_count_ < 5) {
auto is_proxy = res.status == StatusCode::ProxyAuthenticationRequired_407;
// A 407 from a direct (NO_PROXY-bypassed) origin is meaningless and
// must not trigger a retry — that would let the origin extract the
// user's proxy digest credentials.
if (is_proxy && !is_proxy_enabled_for_host(host_)) { return ret; }
// Only retry when the 407 actually came from a proxy hop: plain HTTP
// through an enabled proxy. HTTPS via CONNECT tunnels the 407 from the
// origin (#2457); direct/bypassed origins have no proxy hop at all.
if (is_proxy && !(!is_ssl() && is_proxy_enabled_for_host(host_))) {
return ret;
}
const auto &username =
is_proxy ? proxy_digest_auth_username_ : digest_auth_username_;