setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper

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
This commit is contained in:
Daniel Stenberg 2021-08-23 09:58:54 +02:00
parent 0854781c18
commit 46d4373ea7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 2 additions and 7 deletions

View 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.

View 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"

View 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:
/*

View file

@ -86,7 +86,6 @@
1129
1130
1131
1137
1144
1156
1160