Demian Brecht added the comment:

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?

----------
nosy: +dbrecht

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12849>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to