summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 02:22:52 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 02:22:52 +0000
commitd5a30959562915bfefe907265ca17174c7aedfc6 (patch)
treefe90d9bf4e893aa2451f63b2d82c625734293834 /net/http
parent39cd64ed4d4cf04df49c1f64e40019e9675dbba7 (diff)
downloadchromium_src-d5a30959562915bfefe907265ca17174c7aedfc6.zip
chromium_src-d5a30959562915bfefe907265ca17174c7aedfc6.tar.gz
chromium_src-d5a30959562915bfefe907265ca17174c7aedfc6.tar.bz2
Add specific error codes for when SOCKS connect fails.
This also fixes HttpNetworkTransaction to fallback to the next proxy after a failure is encountered using a SOCKS proxy server. Note that I decided against using finer granularity error codes, since it just adds a higher maintenance cost to ReconsiderProxyAfterError(). Power users can get better information on the cause of the failure by looking at the LoadLog anyway. BUG=34386 Review URL: http://codereview.chromium.org/567030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_network_transaction.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 4be555f..f970384 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1585,7 +1585,18 @@ int HttpNetworkTransaction::ReconsiderProxyAfterError(int error) {
case ERR_CONNECTION_ABORTED:
case ERR_TIMED_OUT:
case ERR_TUNNEL_CONNECTION_FAILED:
+ case ERR_SOCKS_CONNECTION_FAILED:
break;
+ case ERR_SOCKS_CONNECTION_HOST_UNREACHABLE:
+ // Remap the SOCKS-specific "host unreachable" error to a more
+ // generic error code (this way consumers like the link doctor
+ // know to substitute their error page).
+ //
+ // Note that if the host resolving was done by the SOCSK5 proxy, we can't
+ // differentiate between a proxy-side "host not found" versus a proxy-side
+ // "address unreachable" error, and will report both of these failures as
+ // ERR_ADDRESS_UNREACHABLE.
+ return ERR_ADDRESS_UNREACHABLE;
default:
return error;
}