From 7c2085779324d3979765fdda81ef7300c42a7609 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 1 Aug 2025 13:06:54 +0200 Subject: [PATCH] CURLOPT_POSTREDIR.md drop cast, add note to history --- docs/libcurl/opts/CURLOPT_POSTREDIR.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.md b/docs/libcurl/opts/CURLOPT_POSTREDIR.md index 6f4d48b140..c497186912 100644 --- a/docs/libcurl/opts/CURLOPT_POSTREDIR.md +++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.md @@ -64,8 +64,8 @@ int main(void) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data=true"); /* example.com is redirected, so we tell libcurl to send POST on 301, - 302 and 303 HTTP response codes */ - curl_easy_setopt(curl, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL); + 302 and 303 HTTP response codes. */ + curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); curl_easy_perform(curl); } @@ -77,6 +77,9 @@ int main(void) This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 then. CURL_REDIR_POST_303 was added in 7.26.0. +CURL_REDIR_\* macros became `long` types in 8.16.0, prior to this version +a `long` cast is necessary when passing to curl_easy_setopt(3). + # %AVAILABILITY% # RETURN VALUE