From 0b864bde087a1476d6b6b2514dbbc5b5e7c5e30f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Oct 2024 13:53:20 +0200 Subject: [PATCH] CURLOPT_HEADERFUNCTION.md: do not modify the passed in buffer Closes #15148 --- docs/libcurl/opts/CURLOPT_HEADERFUNCTION.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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