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 barry, martin.panter
Date 2016-10-28.22:42:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477694535.84.0.726910173055.issue28548@psf.upfronthosting.co.za>
In-reply-to
Content
I think you should be able to reproduce this without Mailman or tox, by just running “python -m http.server”.

The problem is the “HTTP/0.9” protocol that Python is assuming does not include a header section, so there is no place to put a 400 status code or header fields. The HTTP 0.9 response is supposed to only be a HTML body; see <https://www.w3.org/Protocols/HTTP/AsImplemented.html> and <https://tools.ietf.org/html/rfc1945#section-6>.

I think we should drop HTTP 0.9 response support from Python’s HTTP server, as well as the attempted but buggy request support. But there was a bit of resistance; see Issue 10721.

Another possibility would be to change default_request_version so that error responses are sent as HTTP 1.0. But there may be more fixes needed for this to continue the buggy HTTP 0.9 support; see Issue 26578.
History
Date User Action Args
2016-10-28 22:42:15martin.pantersetrecipients: + martin.panter, barry
2016-10-28 22:42:15martin.pantersetmessageid: <1477694535.84.0.726910173055.issue28548@psf.upfronthosting.co.za>
2016-10-28 22:42:15martin.panterlinkissue28548 messages
2016-10-28 22:42:15martin.pantercreate