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

Unified Diff: net/http/http_stream_request.cc

Issue 3417010: Integrate the SpdyProxyClientSocket into the HttpStreamRequest... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebasing again Created 10 years, 2 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_stream_request.h ('k') | net/socket/socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_request.cc
===================================================================
--- net/http/http_stream_request.cc (revision 62460)
+++ net/http/http_stream_request.cc (working copy)
@@ -460,9 +460,9 @@
}
// Check next if we have a spdy session for this proxy. If so, then go
// straight to using that.
- if (proxy_info()->is_https()) {
+ if (IsHttpsProxyAndHttpUrl()) {
HostPortProxyPair proxy(proxy_info()->proxy_server().host_port_pair(),
- proxy_info()->proxy_server());
+ ProxyServer::Direct());
if (session_->spdy_session_pool()->HasSession(proxy)) {
using_spdy_ = true;
next_state_ = STATE_CREATE_STREAM;
@@ -537,6 +537,8 @@
endpoint_,
session_->auth_cache(),
session_->http_auth_handler_factory(),
+ session_->spdy_session_pool(),
+ session_->mutable_spdy_settings(),
using_ssl_);
} else {
DCHECK(proxy_info()->is_socks());
@@ -725,10 +727,11 @@
// connection, or it might be a SPDY session through an HTTP or HTTPS proxy.
spdy_session =
spdy_pool->Get(pair, session_->mutable_spdy_settings(), net_log_);
- } else if (proxy_info()->is_https()) {
+ } else if (IsHttpsProxyAndHttpUrl()) {
// If we don't have a direct SPDY session, and we're using an HTTPS
// proxy, then we might have a SPDY session to the proxy
- pair = HostPortProxyPair(proxy_server.host_port_pair(), proxy_server);
+ pair = HostPortProxyPair(proxy_server.host_port_pair(),
+ ProxyServer::Direct());
if (spdy_pool->HasSession(pair)) {
spdy_session =
spdy_pool->Get(pair, session_->mutable_spdy_settings(), net_log_);
@@ -751,7 +754,8 @@
if (spdy_session->IsClosed())
return ERR_CONNECTION_CLOSED;
- stream_.reset(new SpdyHttpStream(spdy_session, direct));
+ bool useRelativeUrl = direct || request_info().url.SchemeIs("https");
willchan no longer on Chromium 2010/12/02 22:44:31 is this WebKit style sneaking in here? :P s/useRel
+ stream_.reset(new SpdyHttpStream(spdy_session, useRelativeUrl));
return OK;
}
@@ -798,6 +802,10 @@
// TODO(mbelshe): Add other motivations (like EARLY_LOAD_MOTIVATED).
}
+bool HttpStreamRequest::IsHttpsProxyAndHttpUrl() {
+ return proxy_info()->is_https() && request_info().url.SchemeIs("http");
+}
+
// Returns a newly create SSLSocketParams, and sets several
// fields of ssl_config_.
scoped_refptr<SSLSocketParams> HttpStreamRequest::GenerateSslParams(
« no previous file with comments | « net/http/http_stream_request.h ('k') | net/socket/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698