mirror of
https://github.com/curl/curl.git
synced 2026-07-22 22:47:17 +03:00
CURLOPT_MAXREDIRS: allow -1 as a value
... which is valid according to documentation. Regression since
f121575c0b.
Verified now in test 501.
Reported-by: cbartl on github
Fixes #2038
Closes #2039
This commit is contained in:
parent
cda89c8b58
commit
25cb41d35d
2 changed files with 5 additions and 2 deletions
|
|
@ -1043,7 +1043,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
|
|||
* headers. This should mostly be used to detect never-ending loops.
|
||||
*/
|
||||
arg = va_arg(param, long);
|
||||
if(arg < 0)
|
||||
if(arg < -1)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.maxredirs = arg;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue