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

Issue 1089123003: Don't check for unflushed bytes in SSLClientSocketOpenSSL::IsConnectedAndIdle. (Closed)

Created:
5 years, 8 months ago by davidben
Modified:
5 years, 8 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't check for unflushed bytes in SSLClientSocketOpenSSL::IsConnectedAndIdle. This aligns with SSLClientSocketNSS's behavior (which never checks the ring buffer) and with TCPClientSocket's behavior (which never checks writes at all). Because SSLClientSocket::Write may complete before bytes are actually written to the network, it's possible there is data in transport_bio_ still to be written to the network. Normally this wouldn't happen as the peer would read the request before sending a response. But this breaks POSTing to a URL that requires HTTP Negotiate as the server may return a response before draining the POST body. Due to the delayed flush, transport_bio_ may not be clear by the time we check IsConnectedAndIdle. This is not the ideal fix to the auth issue, but it's a minimal one and aligns our OpenSSL behavior with our old NSS one. IsConnectedAndIdle is somewhat unavoidably weird and racy since the check it makes is inherently not very sound. BUG=466147 Committed: https://crrev.com/fc9a6b8c1e98be8ab7b3da6589770abc155a37d6 Cr-Commit-Position: refs/heads/master@{#325348}

Patch Set 1 #

Patch Set 2 : tweak the test slight #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -5 lines) Patch
M net/socket/ssl_client_socket_openssl.cc View 1 chunk +9 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
davidben
I'm not suuuuper happy with this change, but I think it's worthwhile. Both as a ...
5 years, 8 months ago (2015-04-15 17:51:59 UTC) #2
Ryan Sleevi
lgtm
5 years, 8 months ago (2015-04-15 21:50:39 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1089123003/20001
5 years, 8 months ago (2015-04-15 22:10:53 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 8 months ago (2015-04-15 23:47:42 UTC) #6
commit-bot: I haz the power
5 years, 8 months ago (2015-04-15 23:50:00 UTC) #7
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fc9a6b8c1e98be8ab7b3da6589770abc155a37d6
Cr-Commit-Position: refs/heads/master@{#325348}

Powered by Google App Engine
This is Rietveld 408576698