1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 22:45:03 -05:00
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 gitignore: Ignore man page dist files 2017-03-07 23:27:31 +01:00
ALTSVC.md docs: fix typos 2019-11-28 12:58:47 +01:00
BINDINGS.md BINDINGS: PureBasic, Net::Curl for perl and Nim 2019-09-29 22:39:31 +02:00
BUG-BOUNTY.md BUG-BOUNTY: minor formatting fixes [ci skip] 2019-05-09 23:30:26 +02:00
BUGS docs/BUG-BOUNTY: bug bounty time [skip ci] 2019-04-22 17:19:19 +02:00
CHECKSRC.md checksrc: add COPYRIGHTYEAR check 2018-12-03 23:13:40 +01:00
CIPHERS.md CIPHERS.md: Explain Schannel error SEC_E_ALGORITHM_MISMATCH 2019-07-17 01:08:23 -04:00
CMakeLists.txt cmake: add support for building HTML and PDF docs 2017-03-21 14:49:53 +01:00
CODE_OF_CONDUCT.md docs: Update to secure URL versions 2017-09-04 14:08:54 +00:00
CODE_STYLE.md docs: Markdown and misc improvements [ci skip] 2019-05-16 22:11:27 +00:00
CONTRIBUTE.md CONTRIBUTE.md: Fix grammatical errors 2019-02-05 11:56:04 +01:00
curl-config.1 curl-config: add --ssl-backends 2017-12-06 00:12:48 +01:00
CURL-DISABLE.md docs: fix some typos 2019-12-06 13:20:30 +01:00
DEPRECATE.md http09: disable HTTP/0.9 by default in both tool and library 2019-08-06 00:08:14 +02:00
ESNI.md docs: fix some typos 2019-12-06 13:20:30 +01:00
EXPERIMENTAL.md docs/EXPERIMENTAL: explain what it means and what's experimental now 2019-08-07 14:52:02 +02:00
FAQ TLS: add BearSSL vtls implementation 2019-11-26 08:32:23 +01:00
FEATURES axtls: removed 2018-11-01 10:29:53 +01:00
GOVERNANCE.md GOVERNANCE.md: minor spelling fixes 2019-02-28 09:09:31 +01:00
HELP-US.md HELP-US: rename the subtitle too since the label is changed 2017-10-27 11:19:44 +02:00
HISTORY.md HISTORY: OSS-Fuzz started fuzzing libcurl in 2017 2019-12-20 11:04:34 +01:00
HTTP2.md winssl: be consistent in Schannel capitalization 2018-11-07 10:11:13 +01:00
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: converted to markdown => INSTALL.md 2016-10-21 15:57:29 +02:00
INSTALL.cmake whitespace fixes 2018-09-23 22:24:02 +00:00
INSTALL.md docs: fix typos 2019-11-28 12:58:47 +01:00
INTERNALS.md cleanup: s/curl_debug/curl_dbg_debug in comments and docs 2019-08-08 16:01:00 +02:00
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 spelling fixes 2018-06-03 12:14:45 +00:00
Makefile.am CURL-DISABLE: initial docs for the CURL_DISABLE_* defines 2019-11-12 09:35:39 +01:00
MANUAL.md docs: fix some typos 2019-12-06 13:20:30 +01:00
mk-ca-bundle.1 docs/comments: Update to secure URL versions 2017-08-08 21:41:07 +02:00
PARALLEL-TRANSFERS.md docs: fix typos 2019-11-28 12:58:47 +01:00
README.cmake removed execute file permission 2011-12-30 03:53:25 +01:00
README.md replace rawgit links [ci skip] 2018-10-12 21:04:37 +00:00
README.netware whitespace fixes 2018-09-23 22:24:02 +00:00
README.win32 whitespace fixes 2018-09-23 22:24:02 +00:00
RELEASE-PROCEDURE.md docs: Markdown and misc improvements [ci skip] 2019-05-16 22:11:27 +00:00
RESOURCES RESOURCES: update spec names 2017-12-04 09:15:39 +01:00
ROADMAP.md ROADMAP: updated after recent user poll 2019-09-02 09:49:31 +02:00
SECURITY-PROCESS.md SECURITY-PROCESS: fix links [ci skip] 2019-05-11 17:50:37 +02:00
SSL-PROBLEMS.md docs: Markdown and misc improvements [ci skip] 2019-05-16 22:11:27 +00:00
SSLCERTS.md SSLCERTS: improve the openssl command line 2018-08-20 14:05:28 +02:00
THANKS THANKS: add new names from 7.67.0 2019-11-05 16:50:55 +01:00
THANKS-filter THANKS-filter: deal with my typos 'Jat' => 'Jay' 2019-09-20 13:53:23 +02:00
TheArtOfHttpScripting whitespace fixes 2018-09-23 22:24:02 +00:00
TODO docs: fix typos 2019-11-28 12:58:47 +01:00
VERSIONS VERSIONS: now using markdown 2015-06-10 00:21:06 +02:00

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.