diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-31 18:38:11 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-31 18:38:11 +1200 |
commit | 6122f2da444e114091d6aec8e01a43d760503d06 (patch) | |
tree | e1d79af0525ec7c67e136f4448fdd4aa1c4415f2 /libpathod/pathod.py | |
parent | 2ebe994375976720e80e5fe011a56dda278da3d7 (diff) | |
download | mitmproxy-6122f2da444e114091d6aec8e01a43d760503d06.tar.gz mitmproxy-6122f2da444e114091d6aec8e01a43d760503d06.tar.bz2 mitmproxy-6122f2da444e114091d6aec8e01a43d760503d06.zip |
Change test API to allow multiple pathoc requests
Add simple unit test for websocket server
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r-- | libpathod/pathod.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py index 56348fbb..c5ad942a 100644 --- a/libpathod/pathod.py +++ b/libpathod/pathod.py @@ -103,8 +103,15 @@ class PathodHandler(tcp.BaseHandler): while True: try: frm = websockets.Frame.from_file(self.rfile) + retlog = dict( + type="wsframe", + frame=dict( + ), + cipher=None, + ) + self.addlog(retlog) break - except tcp.NetLibTimeout: + except tcp.NetLibTimeout: # pragma: no cover pass lg(frm.human_readable()) return self.handle_websocket, None |