mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
url: change default value for CURLOPT_MAXREDIRS to 30
It was previously unlimited by default, but that's not a sensible default. While changing this has a remote risk of breaking an existing use case, I figure it is more likely to actually save users from loops. Closes #11581
This commit is contained in:
parent
367a66b130
commit
d135d040df
@ -41,7 +41,7 @@ Setting the limit to 0 will make libcurl refuse any redirect.
|
|||||||
|
|
||||||
Set it to -1 for an infinite number of redirects.
|
Set it to -1 for an infinite number of redirects.
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
-1, unlimited
|
30 (since 8.3.0), it was previously unlimited.
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
HTTP(S)
|
HTTP(S)
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
|
@ -490,7 +490,7 @@ CURLcode Curl_init_userdefined(struct Curl_easy *data)
|
|||||||
|
|
||||||
set->filesize = -1; /* we don't know the size */
|
set->filesize = -1; /* we don't know the size */
|
||||||
set->postfieldsize = -1; /* unknown size */
|
set->postfieldsize = -1; /* unknown size */
|
||||||
set->maxredirs = -1; /* allow any amount by default */
|
set->maxredirs = 30; /* sensible default */
|
||||||
|
|
||||||
set->method = HTTPREQ_GET; /* Default HTTP request */
|
set->method = HTTPREQ_GET; /* Default HTTP request */
|
||||||
#ifndef CURL_DISABLE_RTSP
|
#ifndef CURL_DISABLE_RTSP
|
||||||
|
Loading…
Reference in New Issue
Block a user