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 orf
Recipients orf
Date 2017-07-29.14:15:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za>
In-reply-to
Content
The builtin http.server module does not support HTTP keep-alive when sending a response without a content-length. This causes any clients to hang waiting on more response data, while the server hangs waiting for the client to send another request. This is documented (https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler.protocol_version), but it is confusing.

As far as I can tell the fix would be pretty simple: If no content-length header is set then close the connection regardless of the keep-alive header (Keep-alive is advisory and servers can close the connection at-will, regardless of what the client sends).

If a response contains an inaccurate content-length header there is nothing we can do, but if none is present the server (and clients) should not just hang.
History
Date User Action Args
2017-07-29 14:15:08orfsetrecipients: + orf
2017-07-29 14:15:08orfsetmessageid: <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za>
2017-07-29 14:15:08orflinkissue31076 messages
2017-07-29 14:15:08orfcreate