Don't try and read requests that are closed already (#205)

This commit is contained in:
Andrew Godwin 2018-06-02 06:45:02 +01:00 committed by Andrew Godwin
parent 8c031239ad
commit ece52b8e79

View File

@ -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(
{