Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1033)

Unified Diff: net/http/http_proxy_client_socket.cc

Issue 1063563002: Simplify the interface to ProxyClientSocket::BuildTunnelRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WebSocketStreamCreateTest.HandleErrTunnelConnectionFailed Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/proxy_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket.cc
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index a558f8c33da6ad891fca840b7b94ea9e00bcdc8c..bc970b57a4d9d0091990b9ecff00661cdf630962 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -302,7 +302,6 @@ int HttpProxyClientSocket::DidDrainBodyForAuthRestart(bool keep_alive) {
void HttpProxyClientSocket::LogBlockedTunnelResponse() const {
ProxyClientSocket::LogBlockedTunnelResponse(
response_.headers->response_code(),
- request_.url,
is_https_proxy_);
}
@@ -414,7 +413,12 @@ int HttpProxyClientSocket::DoSendRequest() {
proxy_delegate_->OnBeforeTunnelRequest(proxy_server_,
&authorization_headers);
}
- BuildTunnelRequest(request_, authorization_headers, endpoint_,
+ std::string user_agent;
+ if (!request_.extra_headers.GetHeader(HttpRequestHeaders::kUserAgent,
+ &user_agent)) {
+ user_agent.clear();
+ }
+ BuildTunnelRequest(endpoint_, authorization_headers, user_agent,
&request_line_, &request_headers_);
net_log_.AddEvent(
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698