From 42d82442fe9b9487b63cadd8342cd3ef773474fc Mon Sep 17 00:00:00 2001 From: YX Hao Date: Wed, 14 Aug 2024 19:06:06 +0800 Subject: [PATCH] src/http.c: always follow the server `Content-Encoding` the server may adopt gzip forcibly: https://www.python.org/downloads/windows/ --- src/http.c | 3 +-- src/retr.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/http.c b/src/http.c index 383a647e..a13e3b05 100644 --- a/src/http.c +++ b/src/http.c @@ -3810,8 +3810,7 @@ gethttp (struct url *u, struct url *original_url, struct http_stat *hs, hs->local_encoding = ENC_NONE; } #ifdef HAVE_LIBZ - else if (hs->local_encoding == ENC_GZIP - && opt.compression != compression_none) + else if (hs->local_encoding == ENC_GZIP) { const char *p; diff --git a/src/retr.c b/src/retr.c index 6c621b81..232281c5 100644 --- a/src/retr.c +++ b/src/retr.c @@ -253,7 +253,6 @@ write_data (FILE *out, FILE *out2, const char *buf, int bufsize, int fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, wgint startpos, - wgint *qtyread, wgint *qtywritten, double *elapsed, int flags, FILE *out2) {