summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 22:07:48 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 22:07:48 +0000
commitca5ec6ed8c631b8270932413d25a01931efdee59 (patch)
treec96affd9f6d331dd5f1cb0ee4faec28d7cd4f339 /net
parentc60b71c744aaa665589e008f605e396903ce3199 (diff)
downloadchromium_src-ca5ec6ed8c631b8270932413d25a01931efdee59.zip
chromium_src-ca5ec6ed8c631b8270932413d25a01931efdee59.tar.gz
chromium_src-ca5ec6ed8c631b8270932413d25a01931efdee59.tar.bz2
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
Diffstat (limited to 'net')
-rw-r--r--net/http/http_network_transaction.cc2
1 files changed, 1 insertions, 1 deletions
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();