[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

Martin Panter report at bugs.python.org
Mon Jun 27 00:32:24 EDT 2016


Martin Panter added the comment:

This was not fixed properly. The first symptom is that recv(0) etc still blocks if the other end sends no data. The second symptom is that it does not work with suppress_ragged_eofs=False. The problem is SSL is still called to do a read, which returns zero, and that seems to be interpreted as some kind of EOF or shutdown indicator.

(IMO suppress_ragged_eofs=True is a bad default. It essentially treats a man-in-the-middle shutdown as a genuine secure shutdown, but that would be a separate issue.)

----------
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file43555/recv-zero.v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23804>
_______________________________________


More information about the Python-bugs-list mailing list