diff options
-rw-r--r-- | net/http/http_network_transaction.cc | 14 | ||||
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 6d62d30..8bbc883 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -579,6 +579,13 @@ int HttpNetworkTransaction::DoResolveProxyComplete(int result) { pac_request_ = NULL; + if (result != OK) { + DLOG(ERROR) << "Failed to resolve proxy: " << result; + // Fall-back to direct when there were runtime errors in the PAC script, + // or some other failure with the settings. + proxy_info_.UseDirect(); + } + // Remove unsupported proxies from the list. proxy_info_.RemoveProxiesWithoutScheme( ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | @@ -616,13 +623,6 @@ int HttpNetworkTransaction::DoResolveProxyComplete(int result) { return ERR_NO_SUPPORTED_PROXIES; } - if (result != OK) { - DLOG(ERROR) << "Failed to resolve proxy: " << result; - // Fall-back to direct when there were runtime errors in the PAC script, - // or some other failure with the settings. - proxy_info_.UseDirect(); - } - next_state_ = STATE_INIT_CONNECTION; return OK; } diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 380bd49..7be3390 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -28,6 +28,10 @@ //----------------------------------------------------------------------------- +// TODO(eroman): Add a regression test for http://crbug.com/32316 -- when the +// proxy service returns an error, we should fallback to DIRECT instead of +// failing with ERR_NO_SUPPORTED_PROXIES. + namespace net { // Create a proxy service which fails on all requests (falls back to direct). |