diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 2c946e1..1155135 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -159,6 +159,10 @@ class WebRequest(http.Request): "client": self.client_addr, "server": self.server_addr, }) + # Check they didn't close an unfinished request + if self.content.closed: + # Not much we can do, the request is prematurely abandoned. + return # Run application against request self.application_queue.put_nowait( {