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

Unified Diff: net/spdy/spdy_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/spdy/spdy_network_transaction_unittest.cc ('k') | net/websockets/websocket_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket.cc
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index fbfcc1d2e804fea1314a25c6b4abe38a73510375..9bae609a613914ac4360dd2a4b6d42530c7e37cc 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -265,7 +265,6 @@ int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const {
void SpdyProxyClientSocket::LogBlockedTunnelResponse() const {
ProxyClientSocket::LogBlockedTunnelResponse(
response_.headers->response_code(),
- request_.url,
/* is_https_proxy = */ true);
}
@@ -354,10 +353,15 @@ int SpdyProxyClientSocket::DoSendRequest() {
auth_->AddAuthorizationHeader(&authorization_headers);
}
+ std::string user_agent;
+ if (!request_.extra_headers.GetHeader(HttpRequestHeaders::kUserAgent,
+ &user_agent)) {
+ user_agent.clear();
+ }
std::string request_line;
HttpRequestHeaders request_headers;
- BuildTunnelRequest(request_, authorization_headers, endpoint_, &request_line,
- &request_headers);
+ BuildTunnelRequest(endpoint_, authorization_headers, user_agent,
+ &request_line, &request_headers);
net_log_.AddEvent(
NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/websockets/websocket_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698