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(-) (limited to 'libmproxy/encoding.py') 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 From edb10e33aa84c45410bfbd1088b7714245c9f154 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 1 Aug 2013 11:08:00 +1200 Subject: Remove GPL notices left in source files after our change to the MIT license. Thanks to Roy Shamir for reporting this. --- libmproxy/encoding.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'libmproxy/encoding.py') diff --git a/libmproxy/encoding.py b/libmproxy/encoding.py index 4b80d38c..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 . - """ Utility functions for decoding response bodies. """ -- cgit v1.2.3