From: Daniel Stenberg Date: Sat, 5 Apr 2025 22:40:56 +0000 (+0200) Subject: CURLOPT_HTTP_TRANSFER_DECODING: fixed X-Git-Tag: curl-8_14_0~350 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b676ae3b2ae104c62b0c6e7b00fe925678524f37;p=thirdparty%2Fcurl.git CURLOPT_HTTP_TRANSFER_DECODING: fixed The fix in b8bd019c6a02182 (#16959) broke the CURLOPT_HTTP_TRANSFER_DECODING handling, shown in test 319 and curl's --raw option. This is a follow-up that restores the functionality. Enable test 319 again. Fixes #16974 Closes #16984 --- diff --git a/lib/content_encoding.c b/lib/content_encoding.c index 3ca24607a1..f2e77eede1 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -770,7 +770,7 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data, /* not requested, ignore */ CURL_TRC_WRITE(data, "decoder not requested, ignored: %.*s", (int)namelen, name); - if(is_transfer) { + if(is_transfer && !data->set.http_te_skip) { if(has_chunked) failf(data, "A Transfer-Encoding (%.*s) was listed after chunked", (int)namelen, name); diff --git a/lib/setopt.c b/lib/setopt.c index e8fec8de8a..f982366209 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -1129,12 +1129,8 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, /* * disable libcurl transfer encoding is used */ -#ifndef USE_HYPER data->set.http_te_skip = !enabled; /* reversed */ break; -#else - return CURLE_NOT_BUILT_IN; /* hyper does not support */ -#endif case CURLOPT_HTTP_CONTENT_DECODING: /* diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 9f5974233c..5b27569ce8 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -27,8 +27,6 @@ # per line. # Lines starting with '#' letters are treated as comments. # -# PR #16959 makes Transfer-Encoding stricer and thus --raw broke -319 # Uses SRP to "a server not supporting it" but modern stunnel versions # will silently accept it and remain happy 323