This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Claudio.Freire, javawizard, martin.panter
Date 2013-12-06.13:38:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386337111.44.0.722764622033.issue18144@psf.upfronthosting.co.za>
In-reply-to
Content
Confirmed that this happens when the server sends a chunked response, or sends a Content-Length header, but not when the server just sends “Connection: close”. So this looks like the same as Issue 19524, and my patch for that seems to fix the issue here.

Python 3 version of the demo code:

import os, urllib.request
data = b"""{"imp": [{"h": 50, "battr": ["9", "10", "12"], "api": 3, "w": 320,
"instl": 0, "impid": "5d6dedf3-17bb-11e2-b5c0-1040f38b83e0"}]""" * 10
req = urllib.request.Request("http://localhost:8000/bogus?src=1", data)
resp = urllib.request.urlopen(req)
v = resp.read()
resp.close()
os.system("ls -alh /proc/%d/fd/*" % os.getpid())
History
Date User Action Args
2013-12-06 13:38:31martin.pantersetrecipients: + martin.panter, javawizard, Claudio.Freire
2013-12-06 13:38:31martin.pantersetmessageid: <1386337111.44.0.722764622033.issue18144@psf.upfronthosting.co.za>
2013-12-06 13:38:31martin.panterlinkissue18144 messages
2013-12-06 13:38:31martin.pantercreate