Message1712

Author amak
Recipients
Date 2007-07-15.19:37:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The first jython socket bug relating to this problem involves the use of socket FileWrappers.

When httplib creates an HTTPResponse object, which handles the response, it uses socket.makefile to wrap socket, and then closes that file wrapper when finished. Note that this does NOT close the underlying socket, just the wrapper around it.

In the old jython socket module, when a FileWrapper was closed, it closed the socket as well. This is wrong behaviour, but it's been there since the beginning.

The new socket module was a rewrite of the old module, but some behaviours were carried forward, and closing the socket underlying the FileWrapper was one of them.

I have now corrected the behaviour, i.e. closing a socket FileWrapper no longer closes the underlying socket.

It is worth noting that the code sample given above never ran on jython before now; this is the first time it has ever run successfully. More on this in the next message.
History
Date User Action Args
2008-02-20 17:17:53adminlinkissue1751963 messages
2008-02-20 17:17:53admincreate