From 75d04cadf54aa666672295a2920ce83852741884 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 18 Aug 2011 11:46:58 +0200 Subject: [PATCH] Fix a hang on redirects which change the transfer-encoding --- src/ChangeLog | 5 +++++ src/http.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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. */