diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-10-31 15:01:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-11-01 11:56:19 +0100 |
commit | 25cb41d35daad7544518dfd43c522355b13d9d79 (patch) | |
tree | e3e3542ad7a0303fcf9ee03450047d1cdaa4e03c /lib | |
parent | cda89c8b58bc6421911e6455120b86d39bf4c2b5 (diff) |
CURLOPT_MAXREDIRS: allow -1 as a value
... which is valid according to documentation. Regression since
f121575c0b5f.
Verified now in test 501.
Reported-by: cbartl on github
Fixes #2038
Closes #2039
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 2 |
1 files changed, 1 insertions, 1 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; |