aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-10-27 22:05:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-10-27 22:05:38 +0000
commit966fa848a0213be52d3a4b3787c36ec7c5553f22 (patch)
tree113fe21384b7289127ac36f3cfb501dd6ee0571f /lib/url.c
parent6f8fe67ace4346c3c22fb3348d54ba1cfeb59669 (diff)
Nis Jorgensen filed bug report #1338648
(http://curl.haxx.se/bug/view.cgi?id=1338648) which really is more of a feature request, but anyway. It pointed out that --max-redirs did not allow it to be set to 0, which then would return an error code on the first Location: found. Based on Nis' patch, now libcurl supports CURLOPT_MAXREDIRS set to 0, or -1 for infinity. Added test case 274 to verify.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index c4f3fbf3d..bff500f57 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -320,7 +320,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
data->set.infilesize = -1; /* we don't know any size */
data->set.postfieldsize = -1;
-
+ data->set.maxredirs = -1; /* allow any amount by default */
data->state.current_speed = -1; /* init to negative == impossible */
data->set.httpreq = HTTPREQ_GET; /* Default HTTP request */