curl/docs
Jay Satiro 97934a2f71 CURLOPT_HEADERFUNCTION.3: Document that size is always 1
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
2019-12-26 02:26:08 -05:00
..
cmdline-opts docs: TLS SRP doesn't work with TLS 1.3 2019-12-16 16:03:22 +01:00
examples examples/postinmemory.c: Call curl_global_cleanup always 2019-12-24 01:06:47 -05:00
libcurl CURLOPT_HEADERFUNCTION.3: Document that size is always 1 2019-12-26 02:26:08 -05:00
.gitignore
ALTSVC.md docs: fix typos 2019-11-28 12:58:47 +01:00
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 docs: fix some typos 2019-12-06 13:20:30 +01:00
DEPRECATE.md
ESNI.md docs: fix some typos 2019-12-06 13:20:30 +01:00
EXPERIMENTAL.md
FAQ TLS: add BearSSL vtls implementation 2019-11-26 08:32:23 +01:00
FEATURES
GOVERNANCE.md
HELP-US.md
HISTORY.md HISTORY: OSS-Fuzz started fuzzing libcurl in 2017 2019-12-20 11:04:34 +01:00
HTTP2.md
HTTP3.md docs: fix some typos 2019-12-06 13:20:30 +01:00
HTTP-COOKIES.md docs: fix some typos 2019-12-06 13:20:30 +01:00
INSTALL
INSTALL.cmake
INSTALL.md docs: fix typos 2019-11-28 12:58:47 +01:00
INTERNALS.md
KNOWN_BUGS KNOWN_BUGS: TLS session cache doesn't work with TFO 2019-12-16 16:20:16 +01:00
LICENSE-MIXING.md TLS: add BearSSL vtls implementation 2019-11-26 08:32:23 +01:00
MAIL-ETIQUETTE
Makefile.am
MANUAL.md docs: fix some typos 2019-12-06 13:20:30 +01:00
mk-ca-bundle.1
PARALLEL-TRANSFERS.md docs: fix typos 2019-11-28 12:58:47 +01:00
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 docs: fix typos 2019-11-28 12:58:47 +01:00
VERSIONS

curl logo

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.