mirror of
https://github.com/moparisthebest/curl
synced 2024-11-05 09:05:04 -05:00
97934a2f71
For compatibility with `fwrite`, the `CURLOPT_HEADERFUNCTION` callback is passed two `size_t` parameters which, when multiplied, designate the number of bytes of data passed in. In practice, CURL always sets the first parameter (`size`) to 1. This practice is also enshrined in documentation and cannot be changed in future. The documentation states that the default callback is `fwrite`, which means `fwrite` must be a suitable function for this purpose. However, the documentation also states that the callback must return the number of *bytes* it successfully handled, whereas ISO C `fwrite` returns the number of items (each of size `size`) which it wrote. The only way these numbers can be equal is if `size` is 1. Since `size` is 1 and can never be changed in future anyway, document that fact explicitly and let users rely on it. Reported-by: Frank Gevaerts Commit-message-by: Christopher Head Ref: https://github.com/curl/curl/pull/2787 Fixes https://github.com/curl/curl/issues/4758 |
||
---|---|---|
.. | ||
cmdline-opts | ||
examples | ||
libcurl | ||
.gitignore | ||
ALTSVC.md | ||
BINDINGS.md | ||
BUG-BOUNTY.md | ||
BUGS | ||
CHECKSRC.md | ||
CIPHERS.md | ||
CMakeLists.txt | ||
CODE_OF_CONDUCT.md | ||
CODE_STYLE.md | ||
CONTRIBUTE.md | ||
curl-config.1 | ||
CURL-DISABLE.md | ||
DEPRECATE.md | ||
ESNI.md | ||
EXPERIMENTAL.md | ||
FAQ | ||
FEATURES | ||
GOVERNANCE.md | ||
HELP-US.md | ||
HISTORY.md | ||
HTTP2.md | ||
HTTP3.md | ||
HTTP-COOKIES.md | ||
INSTALL | ||
INSTALL.cmake | ||
INSTALL.md | ||
INTERNALS.md | ||
KNOWN_BUGS | ||
LICENSE-MIXING.md | ||
MAIL-ETIQUETTE | ||
Makefile.am | ||
MANUAL.md | ||
mk-ca-bundle.1 | ||
PARALLEL-TRANSFERS.md | ||
README.cmake | ||
README.md | ||
README.netware | ||
README.win32 | ||
RELEASE-PROCEDURE.md | ||
RESOURCES | ||
ROADMAP.md | ||
SECURITY-PROCESS.md | ||
SSL-PROBLEMS.md | ||
SSLCERTS.md | ||
THANKS | ||
THANKS-filter | ||
TheArtOfHttpScripting | ||
TODO | ||
VERSIONS |
Documentation
You'll find a mix of various documentation in this directory and subdirectories, using several different formats. Some of them are not ideal for reading directly in your browser.
If you'd rather see the rendered version of the documentation, check out the curl web site's documentation section for general curl stuff or the libcurl section for libcurl related documentation.