← Commit list

74096802ee

Daniel Stenberg
Daniel Stenberg
2026-06-10
SUCCESS Duration: 239s

Subject

CURLOPT_WRITEFUNCTION.md: mention redirects

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md+7 -2
@@ -47,6 +47,11 @@ defined in the curl.h header file: *CURL_MAX_WRITE_SIZE* (the usual default is
the write callback, you can get up to *CURL_MAX_HTTP_HEADER* bytes of header
data passed into it. This usually means 100K.
+The CURLOPT_WRITEFUNCTION(3) callback receives the final response payload.
+When CURLOPT_FOLLOWLOCATION(3) is enabled, libcurl automatically handles
+intermediate 3xx redirects, meaning their HTTP bodies are skipped and not
+passed to this callback.
+
This function may be called with zero bytes data if the transferred file is
empty.
@@ -60,8 +65,8 @@ aborted and the libcurl function used returns *CURLE_WRITE_ERROR*.
You can also abort the transfer by returning CURL_WRITEFUNC_ERROR (added in
7.87.0), which makes *CURLE_WRITE_ERROR* get returned.
-If the callback function returns CURL_WRITEFUNC_PAUSE it pauses this
-transfer. See curl_easy_pause(3) for further details.
+If the callback function returns CURL_WRITEFUNC_PAUSE it pauses this transfer.
+See curl_easy_pause(3) for further details.
Set this option to NULL to get the internal default function used instead of
your callback. The internal default function writes the data to the FILE *