Martin Panter added the comment: 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()) ---------- nosy: +vadmium _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18144> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com