DescriptionDon'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 #
Messages
Total messages: 7 (2 generated)
|