summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Head <chead@chead.ca>2019-08-27 20:01:25 -0700
committerDaniel Stenberg <daniel@haxx.se>2019-08-28 08:52:29 +0200
commitff2bbfb63747c13ee3c45503e06760adfe92ca2b (patch)
treef323d745465c644ddce5385cb93e2deee1321d5f
parent44c9884552ad740fcec60d334f9601b205bf5b25 (diff)
downloadcurl-ff2bbfb63747c13ee3c45503e06760adfe92ca2b.tar.gz
CURLOPT_HEADERFUNCTION.3: clarify
Closes #4273
-rw-r--r--docs/libcurl/opts/CURLOPT_HEADERFUNCTION.35
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
index b5faa01de..d328d44c0 100644
--- a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
@@ -52,7 +52,7 @@ an error to the library. This will cause the transfer to get aborted and the
libcurl function in progress will return \fICURLE_WRITE_ERROR\fP.
A complete HTTP header that is passed to this function can be up to
-\fICURL_MAX_HTTP_HEADER\fP (100K) bytes.
+\fICURL_MAX_HTTP_HEADER\fP (100K) bytes and includes the final line terminator.
If this option is not set, or if it is set to NULL, but
\fICURLOPT_HEADERDATA(3)\fP is set to anything but NULL, the function used to
@@ -67,6 +67,9 @@ negotiation. If you need to operate on only the headers from the final
response, you will need to collect headers in the callback yourself and use
HTTP status lines, for example, to delimit response boundaries.
+For an HTTP transfer, the status line and the blank line preceding the response
+body are both included as headers and passed to this function.
+
When a server sends a chunked encoded transfer, it may contain a trailer. That
trailer is identical to an HTTP header and if such a trailer is received it is
passed to the application using this callback as well. There are several ways