[issue1159051] Handle corrupted gzip files with unexpected EOF
Matthias Klose
report at bugs.python.org
Sat Mar 30 14:00:16 CET 2013
Matthias Klose added the comment:
another test case failure with this patch:
https://launchpad.net/ubuntu/+archive/test-rebuild-20130329/+build/4416983
reproducible with feedparser 5.1.3 from pypi, on x86 (but not x86_64).
ERROR: test_gzip_struct_error (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./feedparsertest.py", line 433, in test_gzip_struct_error
f = feedparser.parse('http://localhost:8097/tests/compression/gzip-struct-error.gz')
File "/build/buildd/feedparser-5.1.2/feedparser/feedparser.py", line 3836, in parse
data = gzip.GzipFile(fileobj=_StringIO(data)).read()
File "/usr/lib/python2.7/gzip.py", line 253, in read
while self._read(readsize):
File "/usr/lib/python2.7/gzip.py", line 323, in _read
self._read_eof()
File "/usr/lib/python2.7/gzip.py", line 340, in _read_eof
crc32, isize = struct.unpack("<II", self._read_exact(8))
File "/usr/lib/python2.7/gzip.py", line 189, in _read_exact
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
----------------------------------------------------------------------
Ran 4237 tests in 5.190s
FAILED (errors=1)
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 43939)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1159051>
_______________________________________
More information about the Python-bugs-list
mailing list