]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Aug 2021 07:58:54 +0000 (09:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Aug 2021 09:23:17 +0000 (11:23 +0200)
Since this option is also used for FTP, it needs to work to set for
applications even if hyper doesn't support it for HTTP. Verified by test
1137.

Updated docs to specify that the option doesn't work for HTTP when using
the hyper backend.

Closes #7614

docs/cmdline-opts/ignore-content-length.d
docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
lib/setopt.c
tests/data/DISABLED

index cec990a8d653f2c4bff2e6f89c6aac623d68dd46..2555ccaaefddfbd265d8544899e15c85f746fabf 100644 (file)
@@ -10,4 +10,4 @@ files larger than 2 gigabytes.
 For FTP (since 7.46.0), skip the RETR command to figure out the size before
 downloading a file.
 
-This option doesn't work if libcurl was built to use hyper for HTTP.
+This option doesn't work for HTTP if libcurl was built to use hyper.
index 56e9ec954316e85b1e88fb8de95653565d61f449..1465832a43c1c5d4128e729f3d01c4f252240733 100644 (file)
@@ -61,7 +61,7 @@ if(curl) {
 .fi
 .SH AVAILABILITY
 Added in 7.14.1. Support for FTP added in 7.46.0. This option is not working
-for the hyper backend.
+for HTTP when libcurl is built to use the hyper backend.
 .SH RETURN VALUE
 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 .SH "SEE ALSO"
index 076fe5f59c64eb96b7908de0e627e5096f62475a..08827d1ef9e0c3594e8a6d93c59528b78e61641b 100644 (file)
@@ -2370,12 +2370,8 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
     break;
 
   case CURLOPT_IGNORE_CONTENT_LENGTH:
-#ifndef USE_HYPER
     data->set.ignorecl = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
-#else
-    return CURLE_NOT_BUILT_IN;
-#endif
 
   case CURLOPT_CONNECT_ONLY:
     /*
index 80e9b4ec6efddbf7a1bb301754426d7cf9ffc080..5aaec2b209fca219eac7f113aca7415421846723 100644 (file)
@@ -86,7 +86,6 @@
 1129
 1130
 1131
-1137
 1144
 1156
 1160