aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/encoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/encoding.py')
-rw-r--r--libmproxy/encoding.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/libmproxy/encoding.py b/libmproxy/encoding.py
index 9f8acbe9..0fd7af52 100644
--- a/libmproxy/encoding.py
+++ b/libmproxy/encoding.py
@@ -1,18 +1,3 @@
-# Copyright (C) 2012 Aldo Cortesi
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
"""
Utility functions for decoding response bodies.
"""
@@ -54,7 +39,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):