From d8ae7c3e29bcf117eb051f9e74b76fea733c1c64 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Mon, 1 Feb 2016 23:03:15 +0100 Subject: fix tests and use netlib utils --- libmproxy/utils.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'libmproxy/utils.py') diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 5b1c41f1..a697a637 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -173,14 +173,3 @@ def safe_subn(pattern, repl, target, *args, **kwargs): need a better solution that is aware of the actual content ecoding. """ return re.subn(str(pattern), str(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 -- cgit v1.2.3