]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT_HEADERFUNCTION.md: do not modify the passed in buffer
authorDaniel Stenberg <daniel@haxx.se>
Fri, 4 Oct 2024 11:53:20 +0000 (13:53 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 4 Oct 2024 13:35:20 +0000 (15:35 +0200)
Closes #15148

docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md

index 688f1f3baffbd9f5cdf22b0b7c1be6c4a7b3c0dd..1953f8b8a5cfd5813715e8ff5fcb50267d3bd301 100644 (file)
@@ -43,12 +43,12 @@ shown above.
 This callback function gets invoked by libcurl as soon as it has received
 header data. The header callback is called once for each header and only
 complete header lines are passed on to the callback. Parsing headers is easy
-to do using this callback. *buffer* points to the delivered data, and the
-size of that data is *nitems*; *size* is always 1. The provide header
-line is not null-terminated!
+to do using this callback. *buffer* points to the delivered data, and the size
+of that data is *nitems*; *size* is always 1. The provided header line is not
+null-terminated! Do not modify the passed in buffer.
 
-The pointer named *userdata* is the one you set with the
-CURLOPT_HEADERDATA(3) option.
+The pointer named *userdata* is the one you set with the CURLOPT_HEADERDATA(3)
+option.
 
 Your callback should return the number of bytes actually taken care of. If
 that amount differs from the amount passed to your callback function, it