diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-10-31 15:01:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-11-01 09:21:00 +0100 |
commit | 4e9e8fa374538a4f151452ad0837bda2667d8232 (patch) | |
tree | bf3fca905a29ada2a0fe1dd46cab97a4e4d609b1 /lib/url.c | |
parent | b8bd6dc110fbcae20e0902bead097a40ed88e01a (diff) | |
download | curl-bagder/maxredirs-regression.tar.gz |
CURLOPT_MAXREDIRS: allow -1 as a valuebagder/maxredirs-regression
... which is valid according to documentation. Regression since
f121575c0b5f.
Verified now in test 501.
Reported-by: cbartl on github
Fixes #2038
Diffstat (limited to 'lib/url.c')
-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; |