[Zope3-dev] Zope3 vs CVS Python
Guido van Rossum
guido@python.org
Tue, 06 Aug 2002 22:23:13 -0400
[me]
> Maybe the recent changes to socket.py or socketmodule.c for timeout
> sockets have broken this, by changing the way buffering is done.
> The HTTPResponse class uses sock.makefile(), whose Windows
> implementation *did* change as part of the timeout changes; and I
> don't have 100% faith in the changes.
>
> You could try reverting socket.py to revision 1.19; this will break
> the timeout feature, but AFAIK Zope doesn't use that, and it should
> revert any changes introduced by that feature to the _fileobject class
> returned (on Windows only) by s.makefile().
>
> If that makes the failures go away, we can do a close reading of the
> changes to _fileobject tomorrow. (We'll make you a socket expert
> yet. :-)
I looked a bit more. The problem is almsot certainly the fact that
the new _fileobject changes a buffer size of zero to 512, thereby
ignoring httplib's request for an unbuffered file (.makefile('rb',
0)). Now, how to work around this is far from clear. I'll think
tomorrow.
--Guido van Rossum (home page: http://www.python.org/~guido/)