From 1732502cb0bd255fb65ae351f61888d8f4f04ed6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Oct 2021 08:44:14 +0200 Subject: [PATCH] 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 --- docs/HYPER.md | 1 + docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 | 3 ++- lib/setopt.c | 4 ++++ tests/data/DISABLED | 1 - tests/data/test326 | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.47.3