]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT_HTTP_TRANSFER_DECODING: fixed
authorDaniel Stenberg <daniel@haxx.se>
Sat, 5 Apr 2025 22:40:56 +0000 (00:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 6 Apr 2025 09:31:22 +0000 (11:31 +0200)
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

lib/content_encoding.c
lib/setopt.c
tests/data/DISABLED

index 3ca24607a162d6098082bb262001baf86df7cf62..f2e77eede18a04bbf0db9262e1952f5fe3a8bc6a 100644 (file)
@@ -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);
index e8fec8de8a23aa913ed69c3e73f00d612c1b4794..f982366209d15d9eb8dd88e43424c3ef0b2cbef9 100644 (file)
@@ -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:
     /*
index 9f5974233c90317d811c07a59e2c2fc70d4334a0..5b27569ce8be39515591035cdf4f7be0e253a17c 100644 (file)
@@ -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