From: Giuseppe Scrivano Date: Thu, 18 Aug 2011 09:46:58 +0000 (+0200) Subject: Fix a hang on redirects which change the transfer-encoding X-Git-Tag: v1.13.2~5 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=75d04cadf54aa666672295a2920ce83852741884 Fix a hang on redirects which change the transfer-encoding --- diff --git a/src/ChangeLog b/src/ChangeLog index f4ac2559..038ab858 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-18 Giuseppe Scrivano + + * http.c (gethttp): Reset chunked_transfer_encoding on redirections. + Reported by: Axel Reinhold . + 2011-08-13 Giuseppe Scrivano * retr.c (fd_read_body): Ensure max is not already defined. diff --git a/src/http.c b/src/http.c index 247ba674..b7026cd8 100644 --- a/src/http.c +++ b/src/http.c @@ -2040,8 +2040,9 @@ read_header: } } - resp_header_copy (resp, "Transfer-Encoding", hdrval, sizeof (hdrval)); - if (0 == strcasecmp (hdrval, "chunked")) + chunked_transfer_encoding = false; + if (resp_header_copy (resp, "Transfer-Encoding", hdrval, sizeof (hdrval)) + && 0 == strcasecmp (hdrval, "chunked")) chunked_transfer_encoding = true; /* Handle (possibly multiple instances of) the Set-Cookie header. */