From ca5ec6ed8c631b8270932413d25a01931efdee59 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Thu, 19 Nov 2009 22:07:48 +0000 Subject: In RestartIgnoringLastError, use connection_.socket()->IsConnectedAndIdle() instead of connection_.socket()->IsConnected() to check if the connection is still alive, to work around a weakness of our SSLClientSocket::IsConnected implementation, which treats the SSL close_notify alert sent by the server as data received and considers the connection to be still alive. R=hawk BUG=11875 TEST=Visit an HTTPS site with a certificate error such as https://etrade.com/ or https://alioth.debian.org/. When the SSL interstitial page is displayed, wait a few minutes until the server closes the connection. (On Windows, use Sysinternals' TCPView tool to verify the connection is in CLOSE_WAIT state or gone.) Then click the "Proceed anyway" button. We should not get the net::ERR_EMPTY_RESPONSE or net::ERR_CONNECTION_ABORTED error. Review URL: http://codereview.chromium.org/403029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32555 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_network_transaction.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 2dd0c70..e317990 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -164,7 +164,7 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, int HttpNetworkTransaction::RestartIgnoringLastError( CompletionCallback* callback) { - if (connection_.socket()->IsConnected()) { + if (connection_.socket()->IsConnectedAndIdle()) { next_state_ = STATE_SEND_REQUEST; } else { connection_.socket()->Disconnect(); -- cgit v1.1