diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 16:18:21 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 16:18:21 +0000 |
commit | 8536ef56472253442c91dfa5fe4c3fe6fca13139 (patch) | |
tree | 6f0288d0f6c7490f9fdf8c65538c07a7f09fccac /net | |
parent | a9fdefce3f499c046e4f0dd9c19b82ff5462200c (diff) | |
download | chromium_src-8536ef56472253442c91dfa5fe4c3fe6fca13139.zip chromium_src-8536ef56472253442c91dfa5fe4c3fe6fca13139.tar.gz chromium_src-8536ef56472253442c91dfa5fe4c3fe6fca13139.tar.bz2 |
Call GetSSLInfo late, after we have received the response
headers. This is where we used to call GetSSLInfo. In
r56646 (Chrome 7.0) we changed to call GetSSLInfo as soon
as SSL Connect completes. This will be problematic when
we do "pseudo connect" with SSL Snap Start.
Allow HttpStreamParser::GetSSLInfo and
HttpStreamParser::GetSSLCertRequestInfo to be called when
connection_->socket() is not connected.
R=agl,mbelshe
BUG=none
TEST=net_unittests --gtest_filter=HTTPSRequestTest.HTTPS*Test.
For manual testing, verify the info in the Page Security
Information dialog is correct.
Review URL: http://codereview.chromium.org/3603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_network_transaction.cc | 6 | ||||
-rw-r--r-- | net/http/http_stream_parser.cc | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 3291710..7cf599e 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -615,9 +615,6 @@ int HttpNetworkTransaction::DoInitStream() { int HttpNetworkTransaction::DoInitStreamComplete(int result) { if (result == OK) { next_state_ = STATE_GENERATE_PROXY_AUTH_TOKEN; - - if (is_https_request()) - stream_->GetSSLInfo(&response_.ssl_info); } else { if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) result = HandleCertificateRequest(result); @@ -855,6 +852,9 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { if (rv != OK) return rv; + if (is_https_request()) + stream_->GetSSLInfo(&response_.ssl_info); + headers_valid_ = true; return OK; } diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index ce115b3..512f509 100644 --- a/net/http/http_stream_parser.cc +++ b/net/http/http_stream_parser.cc @@ -603,9 +603,7 @@ void HttpStreamParser::SetConnectionReused() { } void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) { - if (request_->url.SchemeIs("https")) { - if (!connection_->socket() || !connection_->socket()->IsConnected()) - return; + if (request_->url.SchemeIs("https") && connection_->socket()) { SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(connection_->socket()); ssl_socket->GetSSLInfo(ssl_info); @@ -614,9 +612,7 @@ void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) { void HttpStreamParser::GetSSLCertRequestInfo( SSLCertRequestInfo* cert_request_info) { - if (request_->url.SchemeIs("https")) { - if (!connection_->socket() || !connection_->socket()->IsConnected()) - return; + if (request_->url.SchemeIs("https") && connection_->socket()) { SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(connection_->socket()); ssl_socket->GetSSLCertRequestInfo(cert_request_info); |