aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-04 23:57:23 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-04 23:57:23 +1200
commit0a7da6a9b1b878cbfabf437759031f816161fab7 (patch)
treeb287c636e98a5ba850c8a3da0c44a06e3d0a53a1 /test/test_pathod.py
parent9311d605964a346e9a51bc841bfcdf5d38e392a1 (diff)
downloadmitmproxy-0a7da6a9b1b878cbfabf437759031f816161fab7.tar.gz
mitmproxy-0a7da6a9b1b878cbfabf437759031f816161fab7.tar.bz2
mitmproxy-0a7da6a9b1b878cbfabf437759031f816161fab7.zip
Rudimentary support for reflected websocket frames.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 43fb8368..c7ea47e3 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -2,6 +2,7 @@ import cStringIO
from libpathod import pathod, version
from netlib import tcp, http
import time
+import sys
import tutils
@@ -211,10 +212,14 @@ class CommonTests(tutils.DaemonTests):
def test_websocket_frame(self):
r = self.pathoc(["ws:/p/", "wf:b@10"], ws_read_limit=0)
- print r
- print self.d.log()
+ print >> sys.stderr, r
+ print >> sys.stderr, self.d.log()
assert self.d.last_log()["type"] == "wsframe"
+ def test_websocket_reflected_frame(self):
+ r = self.pathoc(["ws:/p/", "wf:f'wf'"], ws_read_limit=0)
+ assert r
+
class TestDaemon(CommonTests):
ssl = False