[issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length

2017-07-31 Thread Tom Forbes
Tom Forbes added the comment: Django recently switched to HTTP 1.1 on their development server, and it works fine as long as the middleware is included that generates the content length. Using a 'bare' Django project with no middleware the server will just hang. It sounds like the easiest fix

[issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length

2017-07-29 Thread Martin Panter
Martin Panter added the comment: 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

[issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length

2017-07-29 Thread Tom Forbes
New submission from Tom Forbes: 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