1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00
elinks/src/encoding
Kalle Olavi Niemitalo 7e5e05ca60 Bug 517: read_encoded() == 0 might not mean EOF if non-blocking.
Without this patch, ELinks showed garbage at
<http://www.dwheeler.com/oss_fs_why.html> when bzip2 decompression was
enabled.  safe_read() in bzip2_read() did not see all of the body
bytes that ELinks had received from the server.  After bzip2_read()
received EAGAIN from safe_read() and returned 0, something skipped
1460 bytes.

decompress_data() apparently assumed that read_encoded() returning 0
meant the end of the file, and returned even though len still was
nonzero, i.e. it had not yet written to the pipe all the data that
the caller (read_chunked_http_data() or read_normal_http_data()) had
provided.  The caller did not know this, and discarded the data.
2008-06-07 21:27:37 +03:00
..
bzip2.c encoding: Set *new_len even if data was truncated. 2008-02-17 21:54:19 +02:00
bzip2.h More const in encoding backends. 2007-02-24 23:03:39 +02:00
deflate.c Content-Encoding: deflate means neither zlib nor gzip header. 2008-02-27 00:52:24 +02:00
deflate.h encoding: Fixed a chunked decompression and added the deflate. 2008-02-17 21:54:18 +02:00
encoding.c Bug 517: read_encoded() == 0 might not mean EOF if non-blocking. 2008-06-07 21:27:37 +03:00
encoding.h http encoding: Moved the accept_encoding_header to the http.c. 2008-02-29 15:32:10 +01:00
lzma.c lzma: Set *new_len even if data was truncated. 2008-02-24 20:45:33 +02:00
lzma.h More const in encoding backends. 2007-02-24 23:03:39 +02:00
Makefile lzma: used the lzma library from tukaani.org. 2008-02-24 20:45:32 +02:00