Skip to content

Commit

Permalink
src/http.c: always follow the server Content-Encoding
Browse files Browse the repository at this point in the history
the server may adopt gzip forcibly:
https://www.python.org/downloads/windows/
  • Loading branch information
lifenjoiner committed Aug 14, 2024
1 parent 9cabe70 commit 42d8244
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/retr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 42d8244

Please sign in to comment.