From: Daniel Stenberg Date: Mon, 26 May 2025 08:01:08 +0000 (+0200) Subject: CURLOPT_FOLLOWLOCATION.md: switch to GET => no body X-Git-Tag: curl-8_14_0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=783586b8fd3578f751392caff446cc503dd61151;p=thirdparty%2Fcurl.git CURLOPT_FOLLOWLOCATION.md: switch to GET => no body Clarify URL: https://curl.se/mail/lib-2025-05/0026.html Closes #17454 --- diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.md b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.md index af54e17e13..f3e3b99bd3 100644 --- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.md +++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.md @@ -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)