1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 17:18:48 -05:00

HTTP: Don't attempt to needlessly decompress redirect body

This change fixes a regression where redirect body would needlessly be
decompressed even though it was to be ignored anyway. As it happens this
causes secondary issues since there appears to be a bug in apache2 that
it in certain conditions generates a corrupt zlib response. The
regression was created by commit:
dbcced8e32

Discovered-by: Harry Sintonen
Closes #2798
This commit is contained in:
Harry Sintonen 2018-07-27 01:04:29 +03:00 committed by Daniel Stenberg
parent e78f2cfe56
commit 1836d59ed8
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -797,7 +797,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
nread); nread);
} }
} }
else else if(!k->ignorebody)
result = Curl_unencode_write(conn, k->writer_stack, k->str, nread); result = Curl_unencode_write(conn, k->writer_stack, k->str, nread);
} }
k->badheader = HEADER_NORMAL; /* taken care of now */ k->badheader = HEADER_NORMAL; /* taken care of now */