From: Daniel Stenberg Date: Fri, 4 Oct 2024 11:53:20 +0000 (+0200) Subject: CURLOPT_HEADERFUNCTION.md: do not modify the passed in buffer X-Git-Tag: curl-8_11_0~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b864bde087a1476d6b6b2514dbbc5b5e7c5e30f;p=thirdparty%2Fcurl.git CURLOPT_HEADERFUNCTION.md: do not modify the passed in buffer Closes #15148 --- diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md index 688f1f3baf..1953f8b8a5 100644 --- a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md @@ -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