summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:35:38 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:35:38 +0000
commit655bdbae8bb51e4d449d1ae511dcfaca148735e0 (patch)
tree7ed323395a60176182c1657c444bfa22889c6b4e /net/http
parentd0607d5f7e4ca94be9d5772767de8693c2e7a510 (diff)
downloadchromium_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.cc20
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.