1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Flush decompression with len = 0

This is required by code in encoding/brotli.c.
This commit is contained in:
Witold Filipczyk 2016-01-16 12:58:34 +01:00
parent f4a58ba3b5
commit aec900f2ae

View File

@ -1275,7 +1275,15 @@ read_normal_http_data(struct connection *conn, struct read_buffer *rb)
if (add_fragment(conn->cached, conn->from, rb->data, data_len) == 1)
conn->tries = 0;
} else {
unsigned char *data = decompress_data(conn, rb->data, len, &data_len);
unsigned char *data;
finish:
data = decompress_data(conn, rb->data, len, &data_len);
if (!data && !http->length && len) {
kill_buffer_data(rb, len);
len = 0;
goto finish;
}
if (add_fragment(conn->cached, conn->from, data, data_len) == 1)
conn->tries = 0;