location/follow: mention netrc

Closes #21091
This commit is contained in:
Daniel Stenberg 2026-03-25 10:31:11 +01:00
parent bf6a34d8eb
commit 0c14ed62c4
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 9 additions and 4 deletions

View File

@ -28,3 +28,6 @@ This is subtly different than --location, as that option always set the custom
method in all subsequent requests independent of response code.
Restrict which protocols a redirect is accepted to follow with --proto-redir.
When --netrc is used in combination with this option, credentials for the
followed-to hosts may also be selected from that file.

View File

@ -25,10 +25,12 @@ location (indicated with a Location: header and a 3XX response code), this
option makes curl redo the request to the new place. If used together with
--show-headers or --head, headers from all requested pages are shown.
When authentication is used, or when sending a cookie with `-H Cookie:`, curl
only sends its credentials to the initial host. If a redirect takes curl to a
different host, it does not get the credentials passed on. See
--location-trusted on how to change this.
When authentication is provided on the command line (for example --user or
--oauth2-bearer), or when sending a cookie with `-H Cookie:`, curl only sends
its credentials to the initial host. If a redirect takes curl to a different
host, it does not get the credentials passed on. See --location-trusted on how
to change this. When --netrc is used in combination with this option,
credentials for the followed-to hosts may also be selected from that file.
Limit the amount of redirects to follow by using the --max-redirs option.