From 0c14ed62c45b71ffcc6b7ef905e321288eea3eee Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Mar 2026 10:31:11 +0100 Subject: [PATCH] location/follow: mention netrc Closes #21091 --- docs/cmdline-opts/follow.md | 3 +++ docs/cmdline-opts/location.md | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/cmdline-opts/follow.md b/docs/cmdline-opts/follow.md index e791e36adf..096324f165 100644 --- a/docs/cmdline-opts/follow.md +++ b/docs/cmdline-opts/follow.md @@ -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. diff --git a/docs/cmdline-opts/location.md b/docs/cmdline-opts/location.md index 56950c2dfc..4ea115a634 100644 --- a/docs/cmdline-opts/location.md +++ b/docs/cmdline-opts/location.md @@ -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.