aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'pathod/protocols')
-rw-r--r--pathod/protocols/__init__.py6
-rw-r--r--pathod/protocols/http.py6
-rw-r--r--pathod/protocols/http2.py3
-rw-r--r--pathod/protocols/websockets.py2
4 files changed, 12 insertions, 5 deletions
diff --git a/pathod/protocols/__init__.py b/pathod/protocols/__init__.py
index 1a8c7dab..f8f3008f 100644
--- a/pathod/protocols/__init__.py
+++ b/pathod/protocols/__init__.py
@@ -1 +1,7 @@
from . import http, http2, websockets
+
+__all__ = [
+ "http",
+ "http2",
+ "websockets",
+]
diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py
index 1f1765cb..d09b5bf2 100644
--- a/pathod/protocols/http.py
+++ b/pathod/protocols/http.py
@@ -1,6 +1,6 @@
-from netlib import tcp, wsgi
-from netlib.exceptions import HttpReadDisconnect, TlsException
-from netlib.http import http1, Request
+from netlib import wsgi
+from netlib.exceptions import TlsException
+from netlib.http import http1
from .. import version, language
diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py
index a098a14e..3f45ec80 100644
--- a/pathod/protocols/http2.py
+++ b/pathod/protocols/http2.py
@@ -1,5 +1,6 @@
from netlib.http import http2
-from .. import version, app, language, utils, log
+from .. import language
+
class HTTP2Protocol:
diff --git a/pathod/protocols/websockets.py b/pathod/protocols/websockets.py
index 134d27bc..2b60e618 100644
--- a/pathod/protocols/websockets.py
+++ b/pathod/protocols/websockets.py
@@ -18,7 +18,7 @@ class WebsocketsProtocol:
frm = websockets.Frame.from_file(self.pathod_handler.rfile)
except NetlibException as e:
lg("Error reading websocket frame: %s" % e)
- break
+ return None, None
ended = time.time()
lg(frm.human_readable())
retlog = dict(