1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

content encoding: handle the case when the len is 0 in the chunked encoding.

We do not want to start decompression when the len is 0
with the chunked encoding.
This commit is contained in:
Witold Filipczyk 2008-02-17 12:39:33 +01:00 committed by Kalle Olavi Niemitalo
parent cfb2ef63d6
commit 0b363eb245

View File

@ -1034,7 +1034,7 @@ decompress_data(struct connection *conn, unsigned char *data, int len,
/* ... we aren't finishing yet. */
int written = safe_write(conn->stream_pipes[1], data, len);
if (written > 0) {
if (written >= 0) {
data += written;
len -= written;