aboutsummaryrefslogtreecommitdiffstats
path: root/test/http2/test_http2_protocol.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-05 20:49:03 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-05 20:49:03 +0200
commit6c1c6f5f0ad375d5a8f37007e6cf2d6862282de9 (patch)
tree0291b73c9e8daf78ca3e2ea5e916d3290b1767af /test/http2/test_http2_protocol.py
parente7c84a1ce14ca339184de1cd615727144d50d381 (diff)
downloadmitmproxy-6c1c6f5f0ad375d5a8f37007e6cf2d6862282de9.tar.gz
mitmproxy-6c1c6f5f0ad375d5a8f37007e6cf2d6862282de9.tar.bz2
mitmproxy-6c1c6f5f0ad375d5a8f37007e6cf2d6862282de9.zip
http2: fix EchoHandler test helper
Diffstat (limited to 'test/http2/test_http2_protocol.py')
-rw-r--r--test/http2/test_http2_protocol.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/http2/test_http2_protocol.py b/test/http2/test_http2_protocol.py
index 6a275430..cb46bc68 100644
--- a/test/http2/test_http2_protocol.py
+++ b/test/http2/test_http2_protocol.py
@@ -12,9 +12,10 @@ class EchoHandler(tcp.BaseHandler):
sni = None
def handle(self):
- v = self.rfile.readline()
- self.wfile.write(v)
- self.wfile.flush()
+ while True:
+ v = self.rfile.safe_read(1)
+ self.wfile.write(v)
+ self.wfile.flush()
class TestCheckALPNMatch(test.ServerTestBase):