Commit Graph

6420 Commits

Author SHA1 Message Date
Daniel Stenberg
0238a9b0d7
KNOWN_BUGS: "special characers" in URL works with aws-sigv4
Since #13754
Pointed-out-by: Slaven Rezić
Bug: https://github.com/curl/curl/issues/13754#issuecomment-2268374427
Closes #14392
2024-08-05 15:25:47 +02:00
Daniel Stenberg
7d45b52166
KNOWN_BUGS: mention AppleIDN and WinIDN test problems
Closes #14176
Closes #14387
2024-08-05 08:23:37 +02:00
Alex Snast
8d98118026
wolfssl: add support for ssl cert blob / ssl key blob options
wolfSSL supports setting certificates/private keys from memory blobs
which allow us to implement both CURLOPT_SSLCERT_BLOB and
CURLOPT_SSLKEY_BLOB options.

Closes #14018
2024-08-05 08:17:30 +02:00
Jay Satiro
573aaec3be easy: fix curl_easy_upkeep for shared connection caches
- Determine which connection cache is or will be used by the easy handle
  and perform connection upkeep on that cache.

This change allows curl_easy_upkeep to be effective on easy handles that
are using a shared connection cache, either from a user created shared
connection cache or a user created multi which has its own shared
connection cache.

Prior to this change curl_easy_upkeep would upkeep the connection cache
for the easy handle only if that cache was from the multi owned by the
easy handle (ie curl_easy_perform was previously called and there's a
connection cache exclusive to the easy handle in
data->multi_easy->conn_cache).

Ref: https://curl.se/mail/lib-2024-01/0016.html

Closes https://github.com/curl/curl/pull/12677
2024-08-04 18:41:18 -04:00
Jay Satiro
b7e769dc87 vtls: stop offering alpn http/1.1 for http2-prior-knowledge
- For HTTPS if http2-prior-knowledge is set then only offer h2 (HTTP/2)
  alpn to the server for protocol negotiation.

Prior to this change both HTTP/2 ("h2") and HTTP/1.1 ("http/1.1") were
offered for ALPN when http2-prior-knowledge was set.

CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (tool: --http2-prior-knowledge) is
meant to send non-TLS HTTP requests HTTP/2 when it is known the server
supports them. However when HTTPS is used then it attempts to first
negotiate the connection with ALPN. In that case the user likely does
not want to offer http/1.1 to the server as an acceptable protocol.

Reported-by: kit-ty-kate@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/9963
Closes https://github.com/curl/curl/pull/14266
2024-08-04 17:59:04 -04:00
Daniel Stenberg
732cb15b97
curl: add --skip-existing
With this option, the entire download is skipped if the selected target
filename already exists when the opertion is about to begin.

Test 994, 995 and 996 verify.

Ref: #11012
Closes #13993
2024-08-04 23:28:09 +02:00
Viktor Szakats
f81f351b9a
tidy-up: OS names
Use these words and casing more consistently across text, comments and
one curl tool output:
AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode,
WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock.

Mostly OS names and a few more.

Also a couple of other minor text fixups.

Closes #14360
2024-08-04 19:17:45 +02:00
Viktor Szakats
a4ad7dc5a3
dist: add missing docs/examples/CMakeLists.txt
Follow-up to dfdd978f7c #13491
Closes #14380
2024-08-04 19:12:50 +02:00
Daniel Stenberg
9a0cf56471
curl: --help [option] displays documentation for given cmdline option
Since the documentation text blob might be gzipped, it needs to search
for what to output in a streaming manner. It then first searches for
"\nALL OPTIONS".

Then, it looks for the start to display at "\n    -[option]" and stops
again at "\n    -". Except for the last option in the man page, which
ends at "\nFILES" - the subtitle for the section following all options
in the manpage.

Test 1707 to 1710 verify

Closes #13997
2024-08-04 16:06:17 +02:00
Daniel Stenberg
9b1e4b4632
tool_operate: support --dump-header % to direct to stderr
Similar to how --trace and --trace-ascii already do it.

Added test 1489 to verify

Closes #13992
2024-08-04 16:02:24 +02:00
Daniel Stenberg
e26eefd9ce
tool_operate: for -O, use "default" as filename when the URL has none
... or pick the last directory part from the path if available.

Instead of returning error.

Add test 690 and 691 to verify. Test 76 and 2036 no longer apply.

Closes #13988
2024-08-04 15:59:51 +02:00
David Sardari
cb829f994d
doh-url.md: point out DOH server IP pinning
Closes #14377
Signed-off-by: David Sardari <d@duxsco.de>
2024-08-04 15:57:45 +02:00
Viktor Szakats
acbc6b703f
cmake: tidy-ups
- tidy-up comments.
- use lowercase, underscore prefixed names for internal variables.
- use `IN LISTS` and `IN ITEMS` in `foreach()` loops.
- rename variable name `OUTPUT` to a more distinctive one.
- tidy-up `STREQUAL` syntax.
- delete commented code.
- indent/whitespace.

Closes #14197
2024-08-03 20:49:15 +02:00
Daniel Stenberg
272233e484
docs/cmdline-opts: update see-also to use show-headers
Since --include is now deprecated since 82c53f821f
2024-08-03 20:29:30 +02:00
Daniel Stenberg
b80798c24d
getparam: make --rate accept "number of units"
Do no more than 5 transfers per 15 seconds with "5/15s" or limit it to 3
transfers per 4 hours with "3/4h" etc.

Previously it would always only work with a single time unit.

Ref: #14242
Closes #14245
2024-08-03 20:27:29 +02:00
Daniel Stenberg
82c53f821f
tool_getparam: make --show-headers the same as --include
Simply a name alias that better explains what the option does.

Closes #13987
2024-08-03 19:56:57 +02:00
Viktor Szakats
8a3740bc8e
curl: support embedding a CA bundle
Add the ability to embed a CA bundle into the curl binary. It is used
when no other runtime or build-time option set one.

This helps curl-for-win macOS and Linux builds to run standalone, and
also helps Windows builds to avoid picking up the CA bundle from an
arbitrary (possibly world-writable) location (though this behaviour is
not currently disablable).

Usage:
- cmake: `-DCURL_CA_EMBED=/path/to/curl-ca-bundle.crt`
- autotools: `--with-ca-embed=/path/to/curl-ca-bundle.crt`
- Makefile.mk: `CURL_CA_EMBED=/path/to/curl-ca-bundle.crt`

Also add new command-line option `--dump-ca-embed` to dump the embedded
CA bundle to standard output.

Closes #14059
2024-08-03 09:22:26 +02:00
Daniel Stenberg
65ece771f4
INSTALL.md: MultiSSL and QUIC are mutually exclusive
Reported-by: Matt Jolly
Fixes #14308
Closes #14328
2024-07-31 23:26:40 +02:00
Joe Birr-Pixton
dd95a49d49
rustls: make all tests pass
- supports IP addresses in certs since 0.21
- Remove workaround, and re-enable tests

Closes #14317
2024-07-31 10:44:10 +02:00
Daniel Stenberg
6ba773b6db
THANKS: add names from the 8.9.1 release notes
Also remove duplicates
2024-07-31 08:50:04 +02:00
Viktor Szakats
767d5811b5
tidy-up: URL updates
Closes #14318
2024-07-30 21:27:12 +02:00
Ivan Kuchin
b2696ac37a
misc: cleanup after removing years from copyright
- remove leftover copyright years from few test files
- fix email in copyright lines
- consistent format of copyright lines

Closes #14312
2024-07-30 14:11:48 +02:00
Daniel Stenberg
674e102504
CURLOPT_SSL_CTX_FUNCTION.md: mention CA caching
and add a few more see-also

Closes #14302
2024-07-29 21:19:53 +02:00
Daniel Stenberg
a62dbf2310
TODO: thread-safe sharing 2024-07-28 23:13:51 +02:00
Daniel Stenberg
79677caa33
CURLSHOPT_SHARE.md: mention sessions/cookies as not thread-safe
Sharing of these between threads are apparently also not done safely.

Ref: #14290
Reported-by: Aki Sakurai
Closes #14292
2024-07-28 23:13:44 +02:00
Daniel Stenberg
b446802feb
example/multi-uv: remove the use of globals
- shows how to pass on local variables (better)

- start the transfers nicer (with curl_multi_socket_action)

- consistent and helpful function naming - to better show what functions
  and callbacks that are used for what

- build warning-free with gcc -W -Wall -pedantic

Closes #14287
2024-07-27 23:09:44 +02:00
Daniel Stenberg
2a59c8d4ce
RELEASE-PROCEDURE.md: restore next release date
Pointed-out-by: extrimexxx on github
Bug: https://github.com/curl/curl/pull/14267#issuecomment-2247062235
2024-07-24 09:10:53 +02:00
Daniel Stenberg
cee3278286
RELEASE-PROCEDURE.md: remove the initial build step
Because it is no longer needed to be done by a person as the dmaketgz
script does it by itself.

Removed two past release dates, added two new future ones

Closes #14267
2024-07-24 08:54:29 +02:00
Daniel Stenberg
4997a44850
THANKS: updates from the 8.9.0 release 2024-07-23 23:37:09 +02:00
Daniel Stenberg
340ef55d97
curl_easy_escape.md: move historic details to HISTORY
Closes #14261
2024-07-23 11:24:19 +02:00
Daniel Stenberg
1e769526b4
docs/libcurl: add to cleanup docs that their inputs go invalid
Reported-by: icy17 on github
Fixes #14248
Closes #14258
2024-07-23 11:18:46 +02:00
Daniel Stenberg
bb639db6fb
CURLOPT_SSL_VERIFYHOST.md: refresh
Move mentions of old behavior to the HISTORY section to make it easier
to read about modern behavior.

Added a MATCHING section.

Closes #14241
2024-07-20 17:30:26 +02:00
Daniel Stenberg
5a488251f7
curldown: fixups
- make DEFAULT sections less repetitive

- make historic mentions use HISTORY

- generate the protocols section on `# %PROTOCOLS%` instead of guessing
  where to put it

- generate the availability section on `# %AVAILABILITY%` instead of
  guessing where to put it

- make the protocols section more verbose

Closes #14227
2024-07-19 17:03:25 +02:00
Daniel Stenberg
8c1d9378ac
curldown: make 'added-in:' a mandatory header field
- generate AVAILABILITY manpage sections automatically - for consistent
  wording

- allows us to double-check against other documumentation (symbols-in-versions
  etc)

- enables proper automation/scripting based on this data

- lots of them were wrong or missing in the manpages

- several of them repeated (sometimes mismatching) backend support info

Add test 1488 to verify "added-in" version numbers against
symbols-in-versions.

Closes #14217
2024-07-18 18:04:09 +02:00
Daniel Stenberg
8dab7465a5
libcurl-docs: make option lists alpha-sorted
The man pages for curl_easy_getinfo, curl_easy_setopt and
curl_multi_setopt now feature the lists of options alphabetically
sorted. Test 1139 verify that they are.

The curl_multi_setopt page also got brief explanations of the listed
options.

Closes #14156
2024-07-14 13:44:24 +02:00
Viktor Szakats
6343034dd1
tidy-up: adjust casing of project names
Mostly TLS/SSH project name.

Closes #14160
2024-07-12 13:56:16 +02:00
Daniel Stenberg
91530abc1e
curl_global_init.md: polish the thread-safe wording
Since this has been thread-safe for two years now, few users actually
are hurt by the previous unsafe ways.

Closes #14158
2024-07-12 12:16:06 +02:00
Dan Fandrich
1263bf6964 DISTROS: add AlmaLinux package source link 2024-07-11 12:52:58 -07:00
Daniel Stenberg
16f56583e5
libcurl-easy.md: now *more* than 300 options
it previously said "almost 300".

Also cleaned up the language somewhat.

Closes #14153
2024-07-11 16:02:41 +02:00
Martin Peck
b7f2c66d7d
MANUAL.md: wrap two example urls that overrun styling
Closes #14149
2024-07-10 23:39:39 +02:00
Dominik Piątkowski
95776c9ab5
docs: start markdown headers with capital letter where applicable
Closes #14115
2024-07-10 16:24:25 +02:00
Yedaya Katsman
4ff7f5163f
variable.md: make example use expand
I used double quotes since it seemed required for powershell, so this
example works in both (ba)sh and powershell as well as cmd.exe.

Closes #14118
2024-07-08 23:15:56 +02:00
Andy Reitz
400717e4c0
GIT-INFO.md: remove version requirements
Keep them in docs/INTERNALS.md

Bump lowest perl to 5.8

Closes #14112
2024-07-08 23:06:05 +02:00
Viktor Szakats
5fc61a37c1
examples: suppress deprecation warnings locally
Simplify making clean builds by silencing deprecation warnings inside
the example code where these may occur.

Drop related build tweaks/comments from GHA jobs.

Example warning:
```
curl/docs/examples/postit2-formadd.c:65:16: error: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Werror=deprecated-declarations]
   65 |                CURLFORM_COPYNAME, "sendfile",
      |                ^~~~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/9841099503/job/27166970904#step:10:829

Closes #14123
2024-07-08 17:22:21 +02:00
Max Mehl
9104bad820
reuse: switch to REUSE 3.2 and REUSE.toml
- remove scripts/copyright.pl

Closes #14107
2024-07-05 20:47:48 +02:00
Yedaya Katsman
0f12ee8b39
curl: move more options to deprecated category
--no-npn, --sslv2, --sslv3

Closes #14109
2024-07-05 20:45:00 +02:00
Daniel Stenberg
2abfc759b9
cmdline-opts: category cleanup
Option cleanups:

 --get is not upload
 --form* are post
 - added several options into ldap, smtp, imap and pop3
 - shortened the category descriptions in the list

category curl fixes:

 --create-dirs removed from 'curl'
 --ftp-create-dirs removed from 'curl'
 --netrc moved to 'auth' from 'curl'
 --netrc-file moved to 'auth' from 'curl'
 --netrc-optional moved to 'auth' from 'curl'
 --no-buffer moved to 'output' from 'curl'
 --no-clobber removed from 'curl'
 --output removed from 'curl'
 --output-dir removed from 'curl'
 --remove-on-error removed from 'curl'

Add a "global" category:

- Made all "global" options set this category

Add a "deprecated" category:

- Moved the deprecated options to it (maybe they should not be in any
 category long term)

Add a 'timeout' category

- Put a number of appropriate options in it

Add an 'ldap' category

- Put the LDAP related option in there

Remove categories "ECH" and "ipfs"

- They should not be categories. Had only one single option each.

Remove category "misc"

- It should not be a category as it is impossible to know when to browse
  it.

--use-ascii moved to ftp and output
--xattr moved to output
--service-name moved to auth

Managen fixes:

- errors if an option is given a category name that is not already setup
  for in code

- verifies that options set `scope: global` also is put in category
  `global´

Closes #14101
2024-07-05 11:05:50 +02:00
Stefan Eissing
18c61aa036
GHA: configure OpenSSL's libdir as 'lib' only
Also mention in HTTP3.md

OpenSSL has a bug that messes the config `--libdir=path` to become the
wrong path in its pkgconfig files. If we just pass `--libdir=lib` it
should avoid this.

Ref: #14099
See also: https://github.com/openssl/openssl/issues/23569

Closes #14102
2024-07-05 10:16:08 +02:00
Yedaya Katsman
62bfcb0c44
help: add flags to output and ssh categories
- Add --output, --remove-on-error, --output-dir and --created-dirs to
  the output help category

- Add --hostpubmd5, --hostpubsha256, --insecure (-k), and --pubkey to
  the ssh help category

Closes #14076
2024-07-04 09:58:23 +02:00
Stefan Eissing
82b32b344e
TODO: remove item about 'SSL_peak'
GnuTLS todo item about using an equivalent of `SSL_peak()`, which
nicely escaped the word checks, is no longer relevant.

We do not use `SSL_peek()` anymore since connection filters were
introduced.

Closes #14091
2024-07-04 09:56:32 +02:00