[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 42/116: CURLOPT_MAXREDIRS: allow -1 as a value
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 42/116: CURLOPT_MAXREDIRS: allow -1 as a value |
Date: |
Tue, 05 Dec 2017 14:51:12 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 25cb41d35daad7544518dfd43c522355b13d9d79
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Oct 31 15:01:23 2017 +0100
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 +-
tests/libtest/lib501.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
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;
diff --git a/tests/libtest/lib501.c b/tests/libtest/lib501.c
index 7a2341246..af65bd4d7 100644
--- a/tests/libtest/lib501.c
+++ b/tests/libtest/lib501.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -44,6 +44,9 @@ int test(char *URL)
test_setopt(curl, CURLOPT_HEADER, 1L);
+ /* just verify that setting this to -1 is fine */
+ test_setopt(curl, CURLOPT_MAXREDIRS, -1L);
+
res = curl_easy_perform(curl);
test_cleanup:
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 08/116: ftplistparser: follow-up cleanup to remove PL_ERROR(), (continued)
- [GNUnet-SVN] [gnurl] 08/116: ftplistparser: follow-up cleanup to remove PL_ERROR(), gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 21/116: Curl_timeleft: change return type to timediff_t, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 06/116: timediff: return timediff_t from the time diff functions, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 16/116: curl_setup.h: oops, shorten the too long line, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 18/116: resolvers: only include anything if needed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 35/116: curlx: the timeval functions are no longer provided as curlx_*, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 17/116: HELP-US: rename the subtitle too since the label is changed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 30/116: cli tool: in -F option arg, comma is a delimiter for files only, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 45/116: url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 15/116: curl_setup: Improve detection of CURL_WINDOWS_APP, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 42/116: CURLOPT_MAXREDIRS: allow -1 as a value,
gnunet <=
- [GNUnet-SVN] [gnurl] 19/116: setopt: fix CURLOPT_SSH_AUTH_TYPES option read, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 38/116: memdebug: use send/recv signature for curl_dosend/curl_dorecv, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 11/116: wildcards: don't use with non-supported protocols, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 24/116: TODO: support multiple Content-Encodings, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 29/116: timeleft: made two more users of Curl_timeleft use timediff_t, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 46/116: CURLOPT_INFILESIZE: accept -1, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 23/116: ROADMAP: cleanup, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 07/116: ftplistparser: free off temporary memory always, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 54/116: Makefile.m32: add brotli support, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 20/116: appveyor: add a win32 build, gnunet, 2017/12/05