From: Daniel Stenberg Date: Fri, 22 Oct 2021 06:44:14 +0000 (+0200) Subject: hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING X-Git-Tag: curl-7_80_0~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1732502cb0bd255fb65ae351f61888d8f4f04ed6;p=thirdparty%2Fcurl.git hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING Simply because hyper doesn't have this ability. Mentioned in docs now. Skip test 326 then Closes #7889 --- diff --git a/docs/HYPER.md b/docs/HYPER.md index da6c663377..4dd3c74c40 100644 --- a/docs/HYPER.md +++ b/docs/HYPER.md @@ -49,6 +49,7 @@ over the wire with Hyper. The hyper backend doesn't support - `CURLOPT_IGNORE_CONTENT_LENGTH` +- `--raw` and disabling `CURLOPT_HTTP_TRANSFER_DECODING` - RTSP ## Remaining issues diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 index 7189423800..96ade1c304 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 @@ -49,7 +49,8 @@ if(curl) { } .fi .SH AVAILABILITY -Added in 7.16.2 +Added in 7.16.2 Does not work with the hyper backend (it will always have +transfer decoding enabled). .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/lib/setopt.c b/lib/setopt.c index 65fe252f47..56d9c49926 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2516,8 +2516,12 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) /* * disable libcurl transfer encoding is used */ +#ifndef USE_HYPER data->set.http_te_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; break; +#else + return CURLE_NOT_BUILT_IN; /* hyper doesn't support */ +#endif case CURLOPT_HTTP_CONTENT_DECODING: /* diff --git a/tests/data/DISABLED b/tests/data/DISABLED index bb2955f436..46f1354263 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -42,7 +42,6 @@ %if hyper 265 266 -326 357 358 359 diff --git a/tests/data/test326 b/tests/data/test326 index 25f201eae6..56d4dcb359 100644 --- a/tests/data/test326 +++ b/tests/data/test326 @@ -39,6 +39,9 @@ line 1 # # Client-side + +!hyper + http