diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 23:35:38 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 23:35:38 +0000 |
commit | 655bdbae8bb51e4d449d1ae511dcfaca148735e0 (patch) | |
tree | 7ed323395a60176182c1657c444bfa22889c6b4e /net/http | |
parent | d0607d5f7e4ca94be9d5772767de8693c2e7a510 (diff) | |
download | chromium_src-655bdbae8bb51e4d449d1ae511dcfaca148735e0.zip chromium_src-655bdbae8bb51e4d449d1ae511dcfaca148735e0.tar.gz chromium_src-655bdbae8bb51e4d449d1ae511dcfaca148735e0.tar.bz2 |
Log an error message when we don't find any
Proxy-Authenticate header that we support when establishing a
tunnel.
R=darin
BUG=8771
Review URL: http://codereview.chromium.org/42193
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_transaction.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index bcd5205..2f3b911 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -1428,6 +1428,26 @@ int HttpNetworkTransaction::HandleAuthChallenge() { if (!auth_handler_[target]) { if (establishing_tunnel_) { + // Log an error message to help debug http://crbug.com/8771. + std::string auth_target(target == HttpAuth::AUTH_PROXY ? + "proxy" : "server"); + LOG(ERROR) << "Can't perform auth to the " << auth_target << " " + << AuthOrigin(target).spec() + << " when establishing a tunnel"; + + std::string challenge; + void* iter = NULL; + while (response_.headers->EnumerateHeader(&iter, "Proxy-Authenticate", + &challenge)) { + LOG(ERROR) << " Has header Proxy-Authenticate: " << challenge; + } + + iter = NULL; + while (response_.headers->EnumerateHeader(&iter, "WWW-Authenticate", + &challenge)) { + LOG(ERROR) << " Has header WWW-Authenticate: " << challenge; + } + // We are establishing a tunnel, we can't show the error page because an // active network attacker could control its contents. Instead, we just // fail to establish the tunnel. |