mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:53:31 +03:00
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.
This commit is contained in:
parent
6f8fe67ace
commit
966fa848a0
9 changed files with 72 additions and 12 deletions
|
|
@ -1127,7 +1127,8 @@ If this option is used several times, the last one will be used.
|
|||
.IP "--max-redirs <num>"
|
||||
Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
|
||||
is used, this option can be used to prevent curl from following redirections
|
||||
\&"in absurdum".
|
||||
\&"in absurdum". By default, the limit is set to 50 redirections. Set this
|
||||
option to -1 to make it limitless.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-0/--http1.0"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
.\" * $Id$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_setopt 3 "22 Sep 2005" "libcurl 7.14.2" "libcurl Manual"
|
||||
.TH curl_easy_setopt 3 "27 Oct 2005" "libcurl 7.14.2" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_setopt - set options for a curl easy handle
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -516,7 +516,9 @@ option is meaningful only when setting \fICURLOPT_FOLLOWLOCATION\fP.
|
|||
Pass a long. The set number will be the redirection limit. If that many
|
||||
redirections have been followed, the next redirect will cause an error
|
||||
(\fICURLE_TOO_MANY_REDIRECTS\fP). This option only makes sense if the
|
||||
\fICURLOPT_FOLLOWLOCATION\fP is used at the same time.
|
||||
\fICURLOPT_FOLLOWLOCATION\fP is used at the same time. Added in 7.15.1:
|
||||
Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for
|
||||
an infinite number of redirects (which is the default)
|
||||
.IP CURLOPT_PUT
|
||||
A non-zero parameter tells the library to use HTTP PUT to transfer data. The
|
||||
data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue