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 demian.brecht
Recipients demian.brecht, jcea, martin.panter, orsenthil, r.david.murray, sanxiago, shubhojeet.ghosh
Date 2014-06-19.16:33:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403195609.15.0.274708915198.issue12849@psf.upfronthosting.co.za>
In-reply-to
Content
The problem here as far as I can tell is that the underlying file object (addinfourl) blocks while waiting for a full response from the server. As detailed in section 8.1 of RFC 2616, requests and responses can be pipelined, meaning requests can be sent while waiting for full responses from a server.

The suggested change of overriding headers is only a partial solution as it doesn't allow for non-blocking pipelining.

@Martin Panter: My suggestion for you would simply be to use http.client (httplib) as R. David Murray suggests, which doesn't auto-inject the Connection header. Also, a server truncating responses when "Connection: close" is sent sounds like a server-side bug to me. Unless you're a server maintainer (or have access to the developers), have you tried reaching out to them to request a fix?
History
Date User Action Args
2014-06-19 16:33:29demian.brechtsetrecipients: + demian.brecht, jcea, orsenthil, r.david.murray, martin.panter, shubhojeet.ghosh, sanxiago
2014-06-19 16:33:29demian.brechtsetmessageid: <1403195609.15.0.274708915198.issue12849@psf.upfronthosting.co.za>
2014-06-19 16:33:29demian.brechtlinkissue12849 messages
2014-06-19 16:33:28demian.brechtcreate