Index: net/http/http_network_transaction.cc |
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
index de9529ed6a5930ebe6cc132be37a5275a1435d4f..bc2d3225debcce2f182e1b4aea4ba757d4838eeb 100644 |
--- a/net/http/http_network_transaction.cc |
+++ b/net/http/http_network_transaction.cc |
@@ -1089,6 +1089,11 @@ int HttpNetworkTransaction::HandleAuthChallenge() { |
if (target == HttpAuth::AUTH_PROXY && proxy_info_.is_direct()) |
return ERR_UNEXPECTED_PROXY_AUTH; |
+ // This case can trigger when an HTTPS server responds with a 407 status |
+ // code through a non-authenticating proxy. |
+ if (!auth_controllers_[target].get()) |
+ return ERR_UNEXPECTED_PROXY_AUTH; |
+ |
int rv = auth_controllers_[target]->HandleAuthChallenge( |
headers, (request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) != 0, false, |
net_log_); |