Changes between Initial Version and Version 1 of Ticket #28440


Ignore:
Timestamp:
Jul 27, 2017, 9:58:01 AM (7 years ago)
Author:
Tom Forbes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28440 – Description

    initial v1  
    33This results in tools like `curl` hanging forever, and browsers continually displaying the loading bar.
    44
    5 [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.
     5[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.
    66
    7 Removing the current `handle` function with `handle_one_request` fixes this problem, and still seems to use HTTP 1.1.
     7Replacing the current `handle` function with `handle_one_request` fixes this problem, and still seems to use HTTP 1.1.
Back to Top