aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-01-25 23:04:15 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-02-04 09:52:27 +0100
commit187691e65bf4a18de3567d6d801d78aa721b9fa5 (patch)
treedcbd5ac1ae00b1298a74180ef6cf0b32dc552ea5
parent41f4197a0dd73a2b00ea8485608ba9b05a605dd4 (diff)
downloadmitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.tar.gz
mitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.tar.bz2
mitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.zip
remove print
-rw-r--r--libmproxy/utils.py4
-rw-r--r--test/test_protocol_http2.py1
2 files changed, 4 insertions, 1 deletions
diff --git a/libmproxy/utils.py b/libmproxy/utils.py
index 94dbbca8..299e8749 100644
--- a/libmproxy/utils.py
+++ b/libmproxy/utils.py
@@ -177,5 +177,9 @@ def safe_subn(pattern, repl, target, *args, **kwargs):
def http2_read_frame(rfile):
field = rfile.peek(3)
length = int(field.encode('hex'), 16)
+
+ if length == 4740180:
+ raise ValueError("Probably not the correct length bytes: %s" % rfile.peek(20))
+
raw_frame = rfile.safe_read(9 + length)
return raw_frame
diff --git a/test/test_protocol_http2.py b/test/test_protocol_http2.py
index 4fa2c701..17687b45 100644
--- a/test/test_protocol_http2.py
+++ b/test/test_protocol_http2.py
@@ -107,7 +107,6 @@ class PushHttp2Server(netlib_tservers.ServerTestBase):
h2_conn.end_stream(4)
self.wfile.write(h2_conn.data_to_send())
self.wfile.flush()
- print("HERE")
elif isinstance(event, h2.events.ConnectionTerminated):
return