From 25cb41d35daad7544518dfd43c522355b13d9d79 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 31 Oct 2017 15:01:23 +0100 Subject: 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 --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index dec402c1d..c334578ea 100644 --- a/lib/url.c +++ b/lib/url.c @@ -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; -- cgit v1.2.3