aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index 052bb379..6478fe4f 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -6,7 +6,7 @@ import threading
import urllib
from netlib import tcp, http, certutils, websockets
-from netlib.exceptions import HttpException
+from netlib.exceptions import HttpException, HttpReadDisconnect
from netlib.http import ALPN_PROTO_HTTP1, ALPN_PROTO_H2
from . import version, app, language, utils, log, protocols
@@ -126,14 +126,13 @@ class PathodHandler(tcp.BaseHandler):
with logger.ctx() as lg:
try:
req = self.protocol.read_request(self.rfile)
+ except HttpReadDisconnect:
+ return None, None
except HttpException as s:
s = str(s)
lg(s)
return None, dict(type="error", msg=s)
- if req.method == b"" and req.form_in == "":
- return None, None
-
if req.method == 'CONNECT':
return self.protocol.handle_http_connect([req.host, req.port, req.httpversion], lg)