Граф коммитов

660 Коммитов

Автор SHA1 Сообщение Дата
Daniel Stenberg a338d86885
docs: fix mandoc -T lint formatting complaints
Closes #8228
2022-01-05 22:45:02 +01:00
Daniel Stenberg 7a92f865b4
misc: s/e-mail/email
Consistency is king. Following the lead in everything curl.

Closes #8159
2021-12-19 23:48:13 +01:00
Patrick Monnerat cdc1da9120
openldap: several minor improvements
- Early check proper LDAP URL syntax. Reject URLs with a userinfo part.
- Use dynamic memory for ldap_init_fd() URL rather than a
  stack-allocated buffer.
- Never chase referrals: supporting it would require additional parallel
  connections and alternate authentication credentials.
- Do not wait 1 microsecond while polling/reading query response data.
- Store last received server code for retrieval with CURLINFO_RESPONSE_CODE.

Closes #8140
2021-12-15 08:07:53 +01:00
RekGRpth 98ae5d8ebc
CURLSHOPT_USERDATA.3: fix copy-paste mistake
Closes #8124
2021-12-09 14:31:22 +01:00
Daniel Stenberg 51a2e3ff1b
CURLOPT_RESOLVE.3: minor polish
Minor rephrasing for some explanations.

Put the format strings in stand-alone lines with .nf/.fi to be easier to spot.

Move "added in" to AVAILABILITY

Closed #8110
2021-12-07 17:13:55 +01:00
Daniel Stenberg 1a4c14cbac
CURLOPT_STDERR.3: does not work with libcurl as a win32 DLL
This is the exact same limitation already documented for
CURLOPT_WRITEDATA but should be clarified here. It also has a different
work-around.

Reported-by: Stephane Pellegrino
Bug: https://github.com/curl/curl/issues/8102
Closes #8103
2021-12-06 16:43:28 +01:00
Daniel Stenberg 2b3dd01b77
multi: handle errors returned from socket/timer callbacks
The callbacks were partially documented to support this. Now the
behavior is documented and returning error from either of these
callbacks will effectively kill all currently ongoing transfers.

Added test 530 to verify

Reported-by: Marcelo Juchem
Fixes #8083
Closes #8089
2021-12-06 14:55:52 +01:00
Patrick Monnerat a40160aee8
openldap: implement STARTTLS
As this introduces use of CURLOPT_USE_SSL option for LDAP, also check
this option in ldap.c as it is not supported by this backend.

Closes #8065
2021-12-06 07:53:04 +01:00
Daniel Stenberg c8a3046555
CURLMOPT_TIMERFUNCTION.3: call it expire time, not interval
Since we say it is a non-repating timer
2021-12-02 12:05:48 +01:00
Florian Van Heghe 8443f975c0
mbedTLS: add support for CURLOPT_CAINFO_BLOB
Closes #8071
2021-11-30 16:19:46 +01:00
Daniel Stenberg 230bb3e278
docs: consistent manpage SYNOPSIS
Make all libcurl related options use .nf (no fill) for the SYNOPSIS
section - for consistent look. roffit then renders that section using
<pre> (monospace font) in html for the website.

Extended manpage-syntax (test 1173) with a basic check for it.

Closes #8062
2021-11-26 16:51:23 +01:00
Daniel Stenberg 76d6e719d9
docs: address proselint nits
- avoid exclamation marks
- use consistent number of spaces after periods: one
- avoid clichés
- avoid using 'very'

Closes #8060
2021-11-26 14:27:07 +01:00
Patrick Monnerat b20b364764
mime: use percent-escaping for multipart form field and file names
Until now, form field and file names where escaped using the
backslash-escaping algorithm defined for multipart mails. This commit
replaces this with the percent-escaping method for URLs.

As this may introduce incompatibilities with server-side applications, a
new libcurl option CURLOPT_MIME_OPTIONS with bitmask
CURLMIMEOPT_FORMESCAPE is introduced to revert to legacy use of
backslash-escaping. This is controlled by new cli tool option
--form-escape.

New tests and documentation are provided for this feature.

Reported by: Ryan Sleevi
Fixes #7789
Closes #7805
2021-11-15 10:40:03 +01:00
Daniel Stenberg ec1d4e6466
curl_share_setopt.3: split out options into their own manpages
CURLSHOPT_LOCKFUNC.3
CURLSHOPT_SHARE.3
CURLSHOPT_UNLOCKFUNC.3
CURLSHOPT_UNSHARE.3
CURLSHOPT_USERDATA.3

Closes #7998
2021-11-12 15:14:40 +01:00
Daniel Stenberg f2665f4e75
docs: NAME fixes in easy option man pages
Closes #7975
2021-11-08 23:10:49 +01:00
Daniel Stenberg a28464ae77
docs: reduce/avoid English contractions
You're => You are
Hasn't => Has not
Doesn't => Does not
Don't => Do not
You'll => You will
etc

Closes #7930
2021-11-07 23:16:27 +01:00
Daniel Stenberg 38ecb56df5
man pages: fix backslash-n in examples
... to be proper backslash-backslash-n sequences to render nicely in man
and on website.

Follow-up to 24155569d8
Reported-by: Sergey Markelov

Fixes https://github.com/curl/curl-www/issues/163
Closes #7962
2021-11-05 08:28:29 +01:00
Daniel Stenberg c6a66ccb5f
CURLOPT_ALTSVC_CTRL.3: mention conn reuse is preferred
Ref: https://github.com/curl/curl/discussions/7954

Closes #7957
2021-11-04 13:53:13 +01:00
Daniel Stenberg 92efb3db7e
docs: reduce use of "very"
"Very" should be avoided in most texts. If intensifiers are needed, try
find better words instead.

Closes #7936
2021-11-01 16:13:12 +01:00
Daniel Stenberg 407392b424
CURLOPT_[PROXY]_SSL_CIPHER_LIST.3: bold instead of quote
Bold the example ciphers instead of using single quotes, which then also
avoids the problem of how to use single quotes when first in a line.

Also rephrased the pages a little.

Reported-by: Sergio Durigan Junior
Ref: #7928
Closes #7934
2021-11-01 15:41:10 +01:00
Jonathan Cardoso Machado dd77ccd87c
CURLOPT_HSTSWRITEFUNCTION.3: using CURLOPT_HSTS_CTRL is required
Closes #7923
2021-10-29 17:27:43 +02:00
Daniel Stenberg 3c05186dc6
opt-manpages: use 'Added in' instead of 'Since'
Closes #7913
2021-10-27 13:56:13 +02:00
Kerem Kat c40914dbdb
docs: fix typo in CURLOPT_TRAILERFUNCTION example
Closes #7910
2021-10-26 23:22:56 +02:00
Daniel Stenberg 16a6b02df2
docs: consistent use of "Added in"
Make them all say "Added in [version]" without using 'curl' or 'libcurl'
in that phrase.
2021-10-25 12:57:11 +02:00
Daniel Stenberg 1732502cb0
hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING
Simply because hyper doesn't have this ability. Mentioned in docs now.

Skip test 326 then

Closes #7889
2021-10-22 12:54:08 +02:00
Daniel Stenberg 33882a066e
CURLOPT_HTTPHEADER.3: add descripion for specific headers
Settting Host: or Transfer-Encoding: chunked actually have special
meanings to libcurl. This change tries to document them

Closes #7829
2021-10-08 15:15:30 +02:00
Jeffrey Tolar 5f563495f1
CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse
... and close connections that are too old instead of reusing them.

By default, this behavior is disabled.

Bug: https://curl.se/mail/lib-2021-09/0058.html
Closes #7751
2021-10-06 14:38:59 +02:00
Max Dymond a517378de5
CURLOPT_PREREQFUNCTION: add new callback
Triggered before a request is made but after a connection is set up

Changes:

- callback: Update docs and callback for pre-request callback
- Add documentation for CURLOPT_PREREQDATA and CURLOPT_PREREQFUNCTION,
- Add redirect test and callback failure test
- Note that the function may be called multiple times on a redirection
- Disable new 2086 test due to Windows weirdness

Closes #7477
2021-09-27 17:16:43 +02:00
i-ky 3363eeb262
urlapi: add curl_url_strerror()
Add curl_url_strerror() to convert CURLUcode into readable string and
facilitate easier troubleshooting in programs using URL API.
Extend CURLUcode with CURLU_LAST for iteration in unit tests.
Update man pages with a mention of new function.
Update example code and tests with new functionality where it fits.

Closes #7605
2021-09-27 08:28:46 +02:00
Mats Lindestam d1e7d9197b
libssh2: add SHA256 fingerprint support
Added support for SHA256 fingerprint in command line curl and in
libcurl.

Closes #7646
2021-09-26 23:20:53 +02:00
a1346054 7cf5e8e70e
misc: fix typos in docs and comments
No user facing output from curl/libcurl is changed by this, just
comments.

Closes #7747
2021-09-23 12:57:55 +02:00
Daniel Stenberg da2598f823
hsts: CURLSTS_FAIL from hsts read callback should fail transfer
... and have CURLE_ABORTED_BY_CALLBACK returned.

Extended test 1915 to verify.

Reported-by: Jonathan Cardoso
Fixes #7726
Closes #7729
2021-09-16 12:36:12 +02:00
Daniel Stenberg 1fbd822b64
opts docs: unify phrasing in NAME header
- avoid writing "set ..." or "enable/disable ..." or "specify ..."
  *All* options for curl_easy_setopt() are about setting or enabling
  things and most of the existing options didn't use that way of
  description.

- start with lowercase letter, unless abbreviation. For consistency.

- Some additional touch-ups

Closes #7688
2021-09-09 09:55:24 +02:00
Daniel Stenberg 3c40840ca7
docs: remove experimental mentions from HSTS and MQTT
Reported-by: Jonathan Cardoso
Bug: https://github.com/curl/curl/pull/6700#issuecomment-913792863
Closes #7681
2021-09-07 08:21:40 +02:00
Daniel Stenberg 7d1bd8a301
CURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also
Closes #7656
2021-09-04 11:27:51 +02:00
Daniel Stenberg 12a2ed970f
opt-docs: verify man page sections + order
In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO

Reviewed-by: Daniel Gustafsson
Closes #7656
2021-09-04 11:27:46 +02:00
Daniel Stenberg 1731a77989
opt-docs: make sure all man pages have examples
Extended manpage-syntax.pl (run by test 1173) to check that every man
page for a libcurl option has an EXAMPLE section that is more than two
lines. Then fixed all errors it found and added examples.

Reviewed-by: Daniel Gustafsson
Closes #7656
2021-09-04 11:27:04 +02:00
Daniel Stenberg 46d4373ea7
setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper
Since this option is also used for FTP, it needs to work to set for
applications even if hyper doesn't support it for HTTP. Verified by test
1137.

Updated docs to specify that the option doesn't work for HTTP when using
the hyper backend.

Closes #7614
2021-08-23 11:23:17 +02:00
Daniel Stenberg 4e53b9430c
man pages: remove trailing whitespaces
Extended test 1173 (via the manpage-syntax.pl script) to detect and warn
for them.

Ref: #7602
Reported-by: a1346054 on github
Closes #7604
2021-08-21 16:44:03 +02:00
Sergey Markelov 1828f6ae2e
sectransp: support CURLINFO_CERTINFO
Fixes #4130
Closes #7372
2021-08-17 08:40:44 +02:00
Aleksandr Krotov beb1b1cb03
bearssl: support CURLOPT_CAINFO_BLOB
Closes #7468
2021-07-28 23:04:53 +02:00
Daniel Stenberg 21e090369e
CURLOPT_DOH_URL.3: CURLOPT_OPENSOCKETFUNCTION is not inherited
Reported-by: Daniel Woelfel
Fixes #7441
Closes #7509
2021-07-28 17:34:22 +02:00
Josh Soref 4d145346ae docs: fix grammar
Fixes https://github.com/curl/curl/issues/7444
Fixes https://github.com/curl/curl/issues/7451
Fixes https://github.com/curl/curl/issues/7465
Closes https://github.com/curl/curl/pull/7495
2021-07-27 13:44:30 -04:00
Daniel Stenberg 76bed59ec3
CURLOPT_SSL_CTX_*.3: tidy up the example
Use the proper code style. Don't store return codes that aren't read.
Copy the same example into CURLOPT_SSL_CTX_FUNCTION.3 as well.

Closes #7500
2021-07-26 22:11:17 +02:00
Jay Satiro 9a6f974881 docs: change max-filesize caveat again
- Add protocols field to max-filesize.d.

- Revert wording on unknown file size caveat and do not discuss specific
  protocols in that section.

Partial revert of ecf0225. All max-filesize options now have the list of
protocols and it's clearer just to have that list without discussing
specific protocols in the caveat.

Reported-by: Josh Soref

Ref: https://github.com/curl/curl/issues/7453#issuecomment-884128762
2021-07-23 02:56:52 -04:00
Oleg Pudeyev 1b8638b36c
CURLMOPT_TIMERFUNCTION.3: remove misplaced "time"
Closes #7470
2021-07-21 23:41:34 +02:00
Jay Satiro ecf0225461 docs: mention max-filesize options also apply to MQTT transfers
Also make it clearer that the caveat 'if the file size is unknown it
the option will have no effect' may apply to protocols other than FTP
and HTTP.

Reported-by: Josh Soref

Fixes https://github.com/curl/curl/issues/7453
2021-07-21 01:03:06 -04:00
Josh Soref de1004eb0f
cleanup: spell DoH with a lowercase o
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Closes #7413
2021-07-16 23:53:13 +02:00
Daniel Gustafsson 21ef78b556 docs: fix inconsistencies in EGDSOCKET documentation
Only the OpenSSL backend actually use the EGDSOCKET, and also use
TLS consistently rather than mixing SSL and TLS. While there, also
fix a minor spelling nit.

Closes: #7391
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
2021-07-14 23:47:37 +02:00
Viktor Szakats 2026124691
idn: fix libidn2 with windows unicode builds
Unicode Windows builds use UTF-8 strings internally in libcurl,
so make sure to call the UTF-8 flavour of the libidn2 API. Also
document that Windows builds with libidn2 and UNICODE do expect
CURLOPT_URL as an UTF-8 string.

Reported-by: dEajL3kA on github
Assisted-by: Jay Satiro
Reviewed-by: Marcel Raad
Closes #7246
Fixes #7228
2021-06-15 12:10:48 +00:00