aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/encoding.py
diff options
context:
space:
mode:
authorOleksandr Sheremet <oshereme@cisco.com>2013-06-17 21:46:54 +0300
committerOleksandr Sheremet <oshereme@cisco.com>2013-06-17 21:46:54 +0300
commit0afd3fc42f1ff31a89b0080b281ab79bf6b566d4 (patch)
treeb4c7547c150d6567ab271d9fa4ffee22c613460a /libmproxy/encoding.py
parent826a1fdaa264a0dfaafe238fec96170c699ca7ae (diff)
downloadmitmproxy-0afd3fc42f1ff31a89b0080b281ab79bf6b566d4.tar.gz
mitmproxy-0afd3fc42f1ff31a89b0080b281ab79bf6b566d4.tar.bz2
mitmproxy-0afd3fc42f1ff31a89b0080b281ab79bf6b566d4.zip
Added handling for EOF reading error in gzipped content.
Diffstat (limited to 'libmproxy/encoding.py')
-rw-r--r--libmproxy/encoding.py2
1 files changed, 1 insertions, 1 deletions
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):