From 0afd3fc42f1ff31a89b0080b281ab79bf6b566d4 Mon Sep 17 00:00:00 2001 From: Oleksandr Sheremet Date: Mon, 17 Jun 2013 21:46:54 +0300 Subject: Added handling for EOF reading error in gzipped content. --- libmproxy/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/encoding.py b/libmproxy/encoding.py index 9f8acbe9..4b80d38c 100644 --- a/libmproxy/encoding.py +++ b/libmproxy/encoding.py @@ -54,7 +54,7 @@ def decode_gzip(content): gfile = gzip.GzipFile(fileobj=cStringIO.StringIO(content)) try: return gfile.read() - except IOError: + except (IOError, EOFError): return None def encode_gzip(content): -- cgit v1.2.3