diff options
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 index f8d2b1889..54ef98db2 100644 --- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 +++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -28,9 +28,15 @@ CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable); .SH DESCRIPTION -A long parameter set to 1 tells the library to follow any Location: header -that the server sends as part of an HTTP header in a 3xx response. The -Location: header can specify a relative or an absolute URL to follow. +The long parameter \fIenable\fP set to 1 tells the library to follow any +Location: header that the server sends as part of an HTTP header in a 3xx +response. The Location: header can specify a relative or an absolute URL to +follow. + +\fIenable\fP is a bitmask. If you set the \fICURLFOLLOW_NO_CUSTOMREQUEST\fP +bit, it will tell libcurl that the method set with +\fICURLOPT_CUSTOMREQUEST(3)\fP will not be used after a redirect if the HTTP +response says so. libcurl will issue another request for the new URL and follow new Location: headers all the way until no more such headers are returned. @@ -72,6 +78,8 @@ if(curl) { .fi .SH AVAILABILITY Along with HTTP + +CURLFOLLOW_NO_CUSTOMREQEUST was added in 7.66.0 .SH RETURN VALUE Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" |