http: ignore disconnects that happen between requests
This commit is contained in:
parent
712e5860aa
commit
951a6fcc36
|
@ -944,9 +944,12 @@ class HTTPHandler(ProtocolHandler):
|
||||||
|
|
||||||
def handle_flow(self):
|
def handle_flow(self):
|
||||||
flow = HTTPFlow(self.c.client_conn, self.c.server_conn, self.live)
|
flow = HTTPFlow(self.c.client_conn, self.c.server_conn, self.live)
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
req = HTTPRequest.from_stream(self.c.client_conn.rfile,
|
req = HTTPRequest.from_stream(self.c.client_conn.rfile,
|
||||||
body_size_limit=self.c.config.body_size_limit)
|
body_size_limit=self.c.config.body_size_limit)
|
||||||
|
except tcp.NetLibDisconnect: # specifically ignore disconnects that happen before/between requests.
|
||||||
|
return False
|
||||||
self.c.log("request", "debug", [req._assemble_first_line(req.form_in)])
|
self.c.log("request", "debug", [req._assemble_first_line(req.form_in)])
|
||||||
ret = self.process_request(flow, req)
|
ret = self.process_request(flow, req)
|
||||||
if ret is not None:
|
if ret is not None:
|
||||||
|
|
Loading…
Reference in New Issue