From af89ba67ab07031d538f52eab270ee4f2fb6b5d9 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Mon, 16 Mar 2009 20:26:38 +0000 Subject: LogBlockedTunnelResponse only needs the response code as input. R=abarth Review URL: http://codereview.chromium.org/46053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11772 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_network_transaction.cc | 11 +++++------ net/http/http_network_transaction.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 2f3b911..04ee364 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -216,7 +216,7 @@ int HttpNetworkTransaction::Read(IOBuffer* buf, int buf_len, // We reach this case when the user cancels a 407 proxy auth prompt. // See http://crbug.com/8473 DCHECK(response_.headers->response_code() == 407); - LogBlockedTunnelResponse(*response_.headers); + LogBlockedTunnelResponse(response_.headers->response_code()); return ERR_TUNNEL_CONNECTION_FAILED; } @@ -956,10 +956,9 @@ void HttpNetworkTransaction::LogTransactionMetrics() const { } void HttpNetworkTransaction::LogBlockedTunnelResponse( - const HttpResponseHeaders& headers) const { - LOG(WARNING) << "Blocked proxy response with status " - << headers.response_code() << " to CONNECT request for " - << request_->url.host() << ":" + int response_code) const { + LOG(WARNING) << "Blocked proxy response with status " << response_code + << " to CONNECT request for " << request_->url.host() << ":" << request_->url.EffectiveIntPort() << "."; } @@ -1021,7 +1020,7 @@ int HttpNetworkTransaction::DidReadResponseHeaders() { // 501 response bodies that contain a useful error message. For // example, Squid uses a 404 response to report the DNS error: "The // domain name does not exist." - LogBlockedTunnelResponse(*headers); + LogBlockedTunnelResponse(headers->response_code()); return ERR_TUNNEL_CONNECTION_FAILED; } } diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 1e14ab8..56dc54a 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -84,7 +84,7 @@ class HttpNetworkTransaction : public HttpTransaction { // Writes a log message to help debugging in the field when we block a proxy // response to a CONNECT request. - void LogBlockedTunnelResponse(const HttpResponseHeaders& headers) const; + void LogBlockedTunnelResponse(int response_code) const; // Called when header_buf_ contains the complete response headers. int DidReadResponseHeaders(); -- cgit v1.1