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 martin.panter, orf
Date 2017-07-29.15:09:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501340967.93.0.206443197133.issue31076@psf.upfronthosting.co.za>
In-reply-to
Content
The trouble is you would also have to parse the Transfer-Encoding field, and have special logic for responses where Content-Length is not needed or irrelevant (certain combinations of method and status code). And even then you risk breaking rare or custom methods and status codes. All this seems complex and at the wrong layer. A server shouldn’t be parsing the header fields it just generated.

Perhaps there could be a new HTTP 1.1 mode (separate from protocol_version) that still closed the connection by default, but had a clearer API for keeping the connection open that the programmer can use in the right circumstances. But I had this thought before (see Issue 21224), and it didn’t seem beneficial.

What’s your use case? Why not just stick with HTTP 1.0, or update the server code to either close the connection or use chunked encoding?
History
Date User Action Args
2017-07-29 15:09:27martin.pantersetrecipients: + martin.panter, orf
2017-07-29 15:09:27martin.pantersetmessageid: <1501340967.93.0.206443197133.issue31076@psf.upfronthosting.co.za>
2017-07-29 15:09:27martin.panterlinkissue31076 messages
2017-07-29 15:09:27martin.pantercreate