[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

Guido van Rossum report at bugs.python.org
Fri Nov 28 05:34:17 CET 2008


Guido van Rossum <guido at python.org> added the comment:

You meant socket.py.

This is an extremely subtle area.  I would be very wary of changing this
-- there is a use case where headers are read from the socket using
readline() but the rest of the data is read directly from the socket,
and this would break if there was buffered data in the file objects. 
This is exactly why httplib sets the buffer size to 0.

Fortunately things are completely different in Python 3.0 and I believe
the same problem doesn't exist -- in 3.0 it makes more sense to always
read from the (binary) buffered file object representing the socket.

----------
nosy: +gvanrossum

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


More information about the Python-bugs-list mailing list