diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-07 08:10:14 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-07 08:10:14 +0000 |
commit | 0107e570df7dece5fee0c34cc023c311dd7a5799 (patch) | |
tree | 020653e32f95df1033b6f4ce45c7170f142da684 /net/http/http_network_transaction.cc | |
parent | e088e2922e961659768eb406714cac79e021e5fc (diff) | |
download | chromium_src-0107e570df7dece5fee0c34cc023c311dd7a5799.zip chromium_src-0107e570df7dece5fee0c34cc023c311dd7a5799.tar.gz chromium_src-0107e570df7dece5fee0c34cc023c311dd7a5799.tar.bz2 |
Revert 77075 - Don't block on stream requests on Alternate-Protocol.
Basically, after we get an HTTP header giving an Alternate-Protocol, we'll end up in a state where we're probably going to issue more HTTP requests. We have the already warm single HTTP connection. We probably don't have a SPDY session open. Previously, once we notice Alternate-Protocol, we'd block on trying to set up the new SPDY session, even though we still have the HTTP connection. Change this so we keep using HTTP until the SPDY session on the Alternate-Protocol becomes available, then we switch over to it.
BUG=69688,75000
TEST=Browse to belshe.com. Examine net-internals to make sure it works. Test over a variety of connections (direct / various proxy types).
Review URL: http://codereview.chromium.org/6610034
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/6621040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.cc')
-rw-r--r-- | net/http/http_network_transaction.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 4bd867d..d3ed391 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -20,7 +20,6 @@ #include "build/build_config.h" #include "googleurl/src/gurl.h" #include "net/base/auth.h" -#include "net/base/host_port_pair.h" #include "net/base/io_buffer.h" #include "net/base/load_flags.h" #include "net/base/net_errors.h" @@ -129,9 +128,6 @@ HttpNetworkTransaction::~HttpNetworkTransaction() { if (stream_->IsResponseBodyComplete()) { // If the response body is complete, we can just reuse the socket. stream_->Close(false /* reusable */); - } else if (stream_->IsSpdyHttpStream()) { - // Doesn't really matter for SpdyHttpStream. Just close it. - stream_->Close(true /* not reusable */); } else { // Otherwise, we try to drain the response body. // TODO(willchan): Consider moving this response body draining to the @@ -372,6 +368,8 @@ void HttpNetworkTransaction::OnStreamReady(const SSLConfig& used_ssl_config, stream_.reset(stream); ssl_config_ = used_ssl_config; proxy_info_ = used_proxy_info; + response_.was_alternate_protocol_available = + stream_request_->was_alternate_protocol_available(); response_.was_npn_negotiated = stream_request_->was_npn_negotiated(); response_.was_fetched_via_spdy = stream_request_->using_spdy(); response_.was_fetched_via_proxy = !proxy_info_.is_direct(); @@ -1069,8 +1067,7 @@ int HttpNetworkTransaction::HandleSSLHandshakeError(int error) { // This could be a TLS-intolerant server, an SSL 3.0 server that // chose a TLS-only cipher suite or a server with buggy DEFLATE // support. Turn off TLS 1.0, DEFLATE support and retry. - session_->http_stream_factory()->AddTLSIntolerantServer( - HostPortPair::FromURL(request_->url)); + session_->http_stream_factory()->AddTLSIntolerantServer(request_->url); ResetConnectionAndRequestForResend(); error = OK; } |