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 jcea, martin.panter, orsenthil, r.david.murray, sanxiago, shubhojeet.ghosh
Date 2014-02-17.02:32:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392604348.68.0.71211436851.issue12849@psf.upfronthosting.co.za>
In-reply-to
Content
I suggest using setdefault() in urllib.request.AbstractHTTPHandler.do_open():

    headers.setdefault("Connection", "close")

I am trying to work around a server that truncates its response when this header is sent, and this change would allow me to specify headers={"Connection", "Keep-Alive"} to get the same effect as dropping the Connection header. This is also consistent with the way the other headers (Accept-Encoding, User-Agent, Host) may be overridden.
History
Date User Action Args
2014-02-17 02:32:28martin.pantersetrecipients: + martin.panter, jcea, orsenthil, r.david.murray, shubhojeet.ghosh, sanxiago
2014-02-17 02:32:28martin.pantersetmessageid: <1392604348.68.0.71211436851.issue12849@psf.upfronthosting.co.za>
2014-02-17 02:32:28martin.panterlinkissue12849 messages
2014-02-17 02:32:27martin.pantercreate