summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-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.