Message60460
There is a bug in the line buffering code in the
Lib/socket.py module.
The write() method in the _fileobject class will flush
the buffered data at every call even if there no new
line character present in the data.
The problem is that the third part of the last if
statement will always be True if self._wbufsize equals 1.
<pre>
if (self._wbufsize == 0 or
self._wbufsize == 1 and '\n' in data or
self._get_wbuf_len() >= self._wbufsize):
self.flush()
</pre>
A possible fix would be the following:
<pre>
if (self._wbufsize == 0 or
self._wbufsize == 1 and '\n' in data or
self._wbufsize > 1 and self._get_wbuf_len() >=
self._wbufsize):
self.flush()
</pre>
|
|
Date |
User |
Action |
Args |
2008-01-20 09:56:43 | admin | link | issue879399 messages |
2008-01-20 09:56:43 | admin | create | |
|