id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 28440 runserver doesn't close the connection for responses without a Content-Length Tom Forbes Tom Forbes "Using MacOS Python 3.5, runserver does not terminate a connection once a HTTP response is sent. This seems to be caused by #25619 (but could be platform specific?). This results in tools like `curl` hanging forever, and browsers continually displaying the loading bar. [https://github.com/django/django/blob/master/django/core/servers/basehttp.py#L137-L142 This code appears to be the culprit], it seems to be copied from the `http.server` stdlib module. It handles a response and sends the contents correctly in the first iteration of the loop, but then `self.close_connection` is still true, so it continues to try and read from the socket whilst the client is also reading from the socket. Replacing the current `handle` function with `handle_one_request` fixes this problem, and still seems to use HTTP 1.1." Bug closed HTTP handling dev Release blocker fixed Ready for checkin 1 0 0 0 0 0