aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/utils.py
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 /libmproxy/utils.py
parent41f4197a0dd73a2b00ea8485608ba9b05a605dd4 (diff)
downloadmitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.tar.gz
mitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.tar.bz2
mitmproxy-187691e65bf4a18de3567d6d801d78aa721b9fa5.zip
remove print
Diffstat (limited to 'libmproxy/utils.py')
-rw-r--r--libmproxy/utils.py4
1 files changed, 4 insertions, 0 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