Message1711

Author amak
Recipients
Date 2007-07-15.19:29:58
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The following example code, taken from the cpython httplib documentation, illustrates this bug

# -=-=-=
import httplib
conn = httplib.HTTPConnection("www.python.org")
conn.request("GET", "/index.html")
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
conn.request("GET", "/parrot.spam")
r2 = conn.getresponse()
print r2.status, r2.reason
data2 = r2.read()
conn.close()
# -=-=-=

Which gives the following behaviour on cpython 2.4

C:\httplibBug>python closesConnectionBug.py
200 OK
404 Not Found

And the following behaviour on jython 2.2rc

C:\httplibBug>jython22 closesConnectionBug.py
200 OK

Traceback (innermost last):
  File "closesConnectionBug.py", line 7, in ?
  File "C:\jython_trunk\jython\dist\Lib\httplib.py", line 705, in request
  File "C:\jython_trunk\jython\dist\Lib\httplib.py", line 728, in _send_request
  File "C:\jython_trunk\jython\dist\Lib\httplib.py", line 699, in endheaders
  File "C:\jython_trunk\jython\dist\Lib\httplib.py", line 585, in _send_output
  File "C:\jython_trunk\jython\dist\Lib\httplib.py", line 564, in send
  File "C:\jython_trunk\jython\dist\Lib\socket.py", line 511, in send
error: (-1, 'Unmapped java exception: <java.nio.channels.ClosedChannelException:None>')

The cause of this is actually two separate bugs, which I will discuss in a separate message.
History
Date User Action Args
2008-02-20 17:17:53adminlinkissue1751963 messages
2008-02-20 17:17:53admincreate