CURLOPT_FOLLOWLOCATION.md: switch to GET => no body

Clarify

URL: https://curl.se/mail/lib-2025-05/0026.html
Closes #17454
This commit is contained in:
Daniel Stenberg 2025-05-26 10:01:08 +02:00
parent 217c22f315
commit 783586b8fd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -53,6 +53,11 @@ responses libcurl switches method from POST to GET unless CURLOPT_POSTREDIR(3)
instructs libcurl otherwise. All other redirect response codes make libcurl
use the same method again.
When libcurl switches method to GET, it then uses that method without sending
any request body. If it does not change the method, it sends the subsequent
request the same way as the previous one; including the request body if one
was provided.
For users who think the existing location following is too naive, too simple
or just lacks features, it is easy to instead implement your own redirect
follow logic with the use of curl_easy_getinfo(3)'s CURLINFO_REDIRECT_URL(3)