]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
16 months agocmdline-opts: category cleanup 14101/head
Daniel Stenberg [Thu, 4 Jul 2024 11:38:18 +0000 (13:38 +0200)] 
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

16 months agoGHA: configure OpenSSL's libdir as 'lib' only
Stefan Eissing [Thu, 4 Jul 2024 14:39:20 +0000 (16:39 +0200)] 
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

16 months agotool_operate: simplify return code handling from url_proto()
Daniel Stenberg [Thu, 4 Jul 2024 21:52:42 +0000 (23:52 +0200)] 
tool_operate: simplify return code handling from url_proto()

The additional checks were superfluous as it would only ever return
error if one of those protocols were set. Also: a returned error
*should* mean get out of there, without having to check more conditions.

Closes #14104

16 months agotool_operate: check for --disable case *sensitively*
Daniel Stenberg [Thu, 4 Jul 2024 21:49:37 +0000 (23:49 +0200)] 
tool_operate: check for --disable case *sensitively*

curl command line options are specified with the correct casing or they
don't match

Closes #14103

16 months agotransfer: avoid polling socket every transfer loop
Stefan Eissing [Thu, 4 Jul 2024 09:14:05 +0000 (11:14 +0200)] 
transfer: avoid polling socket every transfer loop

Improve download performance, minimal effort.

Do not poll the socket for pending data every transfer loop iteration.
This gives 10-20% performance gains on large HTTP/1.1 downloads (on my
machine).

Closes #14098

16 months agotests: delete `CharConv` remains
Viktor Szakats [Thu, 4 Jul 2024 11:12:23 +0000 (13:12 +0200)] 
tests: delete `CharConv` remains

Closes #14100

16 months agoGHA: bump macOS CMake job parallelism to 4 (nproc+1) [ci skip]
Viktor Szakats [Thu, 4 Jul 2024 16:01:59 +0000 (18:01 +0200)] 
GHA: bump macOS CMake job parallelism to 4 (nproc+1) [ci skip]

To match autotools ones and the rest of workflows.

Follow-up to 464282ddfb214917be3d143c035f178f3b77f209 #13807

16 months agohelp: add flags to output and ssh categories
Yedaya Katsman [Tue, 2 Jul 2024 14:52:26 +0000 (17:52 +0300)] 
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

16 months agoTODO: remove item about 'SSL_peak'
Stefan Eissing [Wed, 3 Jul 2024 10:27:05 +0000 (12:27 +0200)] 
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

16 months agoGHA: update dependency gnutls/gnutls to v3.8.6
renovate[bot] [Wed, 3 Jul 2024 21:55:53 +0000 (21:55 +0000)] 
GHA: update dependency gnutls/gnutls to v3.8.6

Closes #14094

16 months agoGHA: update fsfe/reuse-action action to v4
renovate[bot] [Wed, 3 Jul 2024 21:55:59 +0000 (21:55 +0000)] 
GHA: update fsfe/reuse-action action to v4

Closes #14095

16 months agoGHA: Windows job exclusions tweaks
Viktor Szakats [Tue, 2 Jul 2024 17:35:07 +0000 (19:35 +0200)] 
GHA: Windows job exclusions tweaks

- disable SMTP tests in MSYS2/mingw-w64 and MSVC jobs.
  On the suspicion of sometimes hanging:
  https://github.com/curl/curl/actions/runs/9346162475/job/25720437944?pr=13855#step:14:2838
  https://github.com/curl/curl/actions/runs/9758011305/job/26931678639?pr=14084#step:14:2834
  https://github.com/curl/curl/actions/runs/9774468536/job/26982805294#step:11:4731

- run TFTP, MQTT, WebSockets tests in MSYS2/msys jobs again.

- switch hanging old-mingw-w64 7.3.0 job to Release (from Debug).
  Guessing here, 9.5.0 is more solid, and one difference is
  Debug/Release mode. Let's match 7.3.0 with that and see how it changes
  hangs and flakiness.
  The other difference is Unicode ON in 7.3.0. Flaky 6.3.0 was also
  Debug, with Unicode OFF:
  217878bade884202ee5fb2e80186c5fd130392e8 #13566.
  (Unicode unlikely to play a role here IMO.)
  If 7.3.0 keeps hanging / remains flaky I'll consider disabling its
  test runs.

- opt-out from vcpkg telemetry.

Ref: https://github.com/curl/curl/pull/13599#issuecomment-2119372376
Closes #14085

16 months agoDockerfile: update debian:bookworm-slim to 39868a6
renovate[bot] [Tue, 2 Jul 2024 12:43:19 +0000 (12:43 +0000)] 
Dockerfile: update debian:bookworm-slim to 39868a6

Closes #14083

16 months agoFEATURES.md: refresh
Daniel Stenberg [Tue, 2 Jul 2024 22:04:39 +0000 (00:04 +0200)] 
FEATURES.md: refresh

- added lots of missing stuff
- rearranged a little
- remove all footnotes

Closes #14086

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 2 Jul 2024 22:27:32 +0000 (00:27 +0200)] 
RELEASE-NOTES: synced

16 months agocurl_easy_perform.md: call it network transfer, not file transfer
Daniel Stenberg [Tue, 2 Jul 2024 20:54:42 +0000 (22:54 +0200)] 
curl_easy_perform.md: call it network transfer, not file transfer

16 months agowinbuild: MS-DOS batch tidy-ups
Viktor Szakats [Tue, 2 Jul 2024 08:41:35 +0000 (10:41 +0200)] 
winbuild: MS-DOS batch tidy-ups

- prefer `.bat` extension over `.cmd` for MS-DOS batch, which also
  avoids confusion with OS/400 `.cmd` files.
- cleanup `echo` quotes, drop them consistently.
- delete empty output line from one of the error branches.
- prefer lowercase commands like the rest of MS-DOS batches.
- delete a contraction.
- drop backticks from error message.
- use `nmake.exe` consistently.
- use equal/not-equal operator style consistently.
- inline a single-line `if` branch.
- delete exceptions and rules dealing with Windows `.cmd` extension.

Closes #14084

16 months agomulti: fix pollset during RESOLVING phase
Stefan Eissing [Mon, 1 Jul 2024 12:56:27 +0000 (14:56 +0200)] 
multi: fix pollset during RESOLVING phase

- add a DEBUGASSERT for when a transfer's pollset should not be empty.
- move write unpausing from transfer loop into curl_easy_pause. This
  make sure that the url_updatesocket() finds the correct state when
  updating socket events.
- fix HTTP/2 proxy during connect phase to set sockets correctly
- fix test2600 to simulate a socket set
- move write unpausing from transfer loop into curl_easy_pause. This
  make sure that the url_updatesocket() finds the correct state when
  updating socket events.
- waiting for the resolver to deliver might not involve any sockets to
  wait for. Do not generate a warning.

Fixes #14047
Closes #14074

16 months agocmdline-opts: shorten six help texts
Daniel Stenberg [Mon, 1 Jul 2024 15:19:44 +0000 (17:19 +0200)] 
cmdline-opts: shorten six help texts

 o --location-trusted
 o --next
 o --parallel-immmediate
 o --pinnedpubkey
 o --proxy-pass
 o --proxy-ssl-allow-beast

Closes #14075

16 months agomanagen: fix removing backticks from subtitles
Daniel Stenberg [Mon, 1 Jul 2024 21:35:58 +0000 (23:35 +0200)] 
managen: fix removing backticks from subtitles

It erroneously removed them from the wrong variable.

Closes #14081

16 months agocmake: show protocols, then features
Viktor Szakats [Mon, 1 Jul 2024 22:11:29 +0000 (00:11 +0200)] 
cmake: show protocols, then features

To match the order used by `curl -V` and `./configure`.

Closes #14082

16 months agocmdline-docs: fix `--proxy-ca-native` example + tidy-ups
Viktor Szakats [Mon, 1 Jul 2024 19:25:33 +0000 (21:25 +0200)] 
cmdline-docs: fix `--proxy-ca-native` example + tidy-ups

Also:
- fix an indentation.
- fix capitalized option in comment.

Closes #14078

16 months agocmake: sync protocol/feature list with `curl -V` output
Viktor Szakats [Sun, 30 Jun 2024 22:39:03 +0000 (00:39 +0200)] 
cmake: sync protocol/feature list with `curl -V` output

- sort features case-insensitively.
  Requires CMake v3.13.0.
  Follow-up to 0f26abeef1dd1d1a02f8e12dbc3d51e73e9d2e9c #14063

- convert protocol list to lowercase.
  But leave it uppercase in `curl-config`.

Closes #14066

16 months agoGHA/badwords.yml: fixup indent for yamllint [ci skip]
Viktor Szakats [Mon, 1 Jul 2024 21:23:46 +0000 (23:23 +0200)] 
GHA/badwords.yml: fixup indent for yamllint [ci skip]

16 months agoGHA: update dependency awslabs/aws-lc to v1.31.0
renovate[bot] [Mon, 1 Jul 2024 20:50:58 +0000 (20:50 +0000)] 
GHA: update dependency awslabs/aws-lc to v1.31.0

Closes #14080

16 months agoGHA/badwords.yml: check source code wording
Daniel Stenberg [Mon, 1 Jul 2024 13:53:54 +0000 (15:53 +0200)] 
GHA/badwords.yml: check source code wording

Closes #14073

16 months agocode: language cleanup in comments
Daniel Stenberg [Mon, 1 Jul 2024 14:47:21 +0000 (16:47 +0200)] 
code: language cleanup in comments

Based on the standards and guidelines we use for our documentation.

 - expand contractions (they're => they are etc)
 - host name = > hostname
 - file name => filename
 - user name = username
 - man page => manpage
 - run-time => runtime
 - set-up => setup
 - back-end => backend
 - a HTTP => an HTTP
 - Two spaces after a period => one space after period

Closes #14073

16 months agodocs: add RELEASE-TOOLS.md.dist to .gitignore
Yedaya Katsman [Mon, 1 Jul 2024 20:18:42 +0000 (23:18 +0300)] 
docs: add RELEASE-TOOLS.md.dist to .gitignore

Closes #14079

16 months agolibcurl.pc: add more `Requires.private`/`Requires` dependencies
Viktor Szakats [Mon, 1 Jul 2024 09:38:25 +0000 (11:38 +0200)] 
libcurl.pc: add more `Requires.private`/`Requires` dependencies

- add `libmsh3` reference from cmake and autotools.

- add `mit-krb5-gssapi` reference from cmake.

It leaves GSS not set from autotools. The handling of heimdal in cmake
is fuzzy, that's probably missing too.

Follow-up to f057de5a1a950a90d1920021db152a4b695f1a8a #13911
Closes #14072

16 months agocmake: improve wolfSSL detection
Viktor Szakats [Sun, 30 Jun 2024 09:37:06 +0000 (11:37 +0200)] 
cmake: improve wolfSSL detection

- support detecting wolfSSL via pkg-config (like autotools.)

- detect wolfSSL version.

- detect `HAVE_WOLFSSL_DES_ECB_ENCRYPT`.
  (needs e.g. `--enable-curl` when building wolfSSL)

- detect `HAVE_WOLFSSL_FULL_BIO` and enable HTTPS-proxy feature.
  (needs e.g. `--enable-opensslall` when building wolfSSL)

- fix to show `HTTPS-proxy` in cmake feature list.
  Ref: 55807e6c056f27846d70cec70ee6ac3f0e5b3bbe #9962

- fix to show `NTLM` in cmake feature list.

- fix to show `smb` and `smbs` in cmake protocol list.

- add wolfSSL CMake job to GHA (for macOS).

- fix mqtt and wolfSSL symbol clash.
  ```
  ./curl/lib/mqtt.c: In function 'mqtt_doing':
  ./curl/lib/mqtt.c:746:17: error: declaration of 'byte' shadows a global declaration [-Werror=shadow]
    746 |   unsigned char byte;
        |                 ^~~~
  /opt/homebrew/Cellar/wolfssl/5.7.0_1/include/wolfssl/wolfcrypt/types.h:85:36: note: shadowed declaration is here
     85 |             typedef unsigned char  byte;
        |                                    ^~~~
  ```

- format `FindWolfSSL.cmake` closer to neighbours.

Closes #14064

16 months agocurl_url_set: elaborate on scheme guessing
Daniel Stenberg [Mon, 1 Jul 2024 09:03:08 +0000 (11:03 +0200)] 
curl_url_set: elaborate on scheme guessing

Explain a little more and refer to the CURLU_NO_GUESS_SCHEME flag
for getting scheme or URL.

Closes #14071

16 months agodocs: misc language polish
Daniel Stenberg [Mon, 1 Jul 2024 08:37:43 +0000 (10:37 +0200)] 
docs: misc language polish

- CURLINFO_FILETIME*: improve language
- add '32bit' and '64bit' as bad words, use 32-bit and 64-bit
- mksymbolsmanpage.pl: avoid "will"

Closes #14070

16 months agocurl_easy_escape: elaborate a little on encoding a URL
Daniel Stenberg [Mon, 1 Jul 2024 08:11:39 +0000 (10:11 +0200)] 
curl_easy_escape: elaborate a little on encoding a URL

Closes #14069

16 months agocmake: fix feature and protocol lists for SecureTransport
Viktor Szakats [Sun, 30 Jun 2024 21:56:55 +0000 (23:56 +0200)] 
cmake: fix feature and protocol lists for SecureTransport

NTLM was missing from the features list, and SMB/SMBS from
the protocols list in SecureTransport builds.

Follow-up to 76a9c3c4be10b3d4d379d5b23ca76806bbae536a #3619

Reported-by: Tal Regev
Bug: https://github.com/curl/curl/pull/13963#issuecomment-2178791390
Closes #14065

16 months agocurl_str[n]equal.md: tidy up text to make them stand-alone
Daniel Stenberg [Mon, 1 Jul 2024 07:05:19 +0000 (09:05 +0200)] 
curl_str[n]equal.md: tidy up text to make them stand-alone

Previously this was one single manpage for two functions but as they are
two separate ones since a while back, they should each clearly document
their single specific functions.

Follow-up to eefcc1bda4bc

Closes #14068

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 30 Jun 2024 21:16:54 +0000 (23:16 +0200)] 
RELEASE-NOTES: synced

16 months agoGHA: use vcpkg to install packages for MSVC jobs
Tal Regev [Fri, 21 Jun 2024 13:12:07 +0000 (16:12 +0300)] 
GHA: use vcpkg to install packages for MSVC jobs

- enable new dependencies for existing jobs.

- add cache for vcpkg packages.

- tidy-up CMake options and environment for vcpkg.

Closes #13979

16 months agocurl_mprintf.md: add missing comma
Daniel Stenberg [Sun, 30 Jun 2024 14:11:52 +0000 (16:11 +0200)] 
curl_mprintf.md: add missing comma

16 months agoCURLOPT_TLSAUTH_PASSWORD/USERNAME.md: language fixups
Daniel Stenberg [Sat, 29 Jun 2024 21:43:36 +0000 (23:43 +0200)] 
CURLOPT_TLSAUTH_PASSWORD/USERNAME.md: language fixups

- relies *on* TLS SRP
- *for* the specific TLS backends

Closes #14061

16 months agodocs/libcurl: polish the single-line descriptions
Daniel Stenberg [Sat, 29 Jun 2024 22:08:06 +0000 (00:08 +0200)] 
docs/libcurl: polish the single-line descriptions

- use imperative form
- use lowercase
- no period
- unify some phrases
- fix curl_multi_socket and curl_multi_socket_all to keep their own
  descriptions

Closes #14062

16 months agocmake: alpha-sort feature list
Viktor Szakats [Sat, 29 Jun 2024 22:26:49 +0000 (00:26 +0200)] 
cmake: alpha-sort feature list

Like autotools does.

Closes #14063

16 months agoGHA: update github/codeql-action digest to b611370
renovate[bot] [Sat, 29 Jun 2024 20:46:34 +0000 (20:46 +0000)] 
GHA: update github/codeql-action digest to b611370

Closes #14058

16 months agovquic: fix UDP_GRO struct cmsghdr data type
Tatsuhiro Tsujikawa [Sat, 29 Jun 2024 00:55:55 +0000 (09:55 +0900)] 
vquic: fix UDP_GRO struct cmsghdr data type

The data type for UDP_GRO in struct cmsghdr is int. Limit the usage of
UDP_GRO to linux only because it is not portable.

Closes #14056

16 months agomk-ca-bundle.pl: delay 'curl -V' execution until it is needed
Sertonix [Sat, 29 Jun 2024 19:36:25 +0000 (19:36 +0000)] 
mk-ca-bundle.pl: delay 'curl -V' execution until it is needed

Avoid an `Can't exec "curl"` message when curl is not actually needed.

Closes #14060

16 months agosrc/Makefile.am: remove SUBDIRS assignment
Daniel Stenberg [Fri, 28 Jun 2024 21:34:45 +0000 (23:34 +0200)] 
src/Makefile.am: remove SUBDIRS assignment

It was once used to continue into ../docs but is just leftovers now.

Closes #14054

16 months agox509asn1: remove superfluous free()
z2_ [Fri, 28 Jun 2024 12:45:47 +0000 (14:45 +0200)] 
x509asn1: remove superfluous free()

16 months agongtcp2+quictls: fix cert-status use
Stefan Eissing [Fri, 28 Jun 2024 10:10:42 +0000 (12:10 +0200)] 
ngtcp2+quictls: fix cert-status use

- add test for --cert-status on all http versions

Reported-by: Dexter Gerig
Fixes #14049
Closes #14050

16 months agoRELEASE-PROCEDURE.md: update release date
Daniel Stenberg [Fri, 28 Jun 2024 12:30:04 +0000 (14:30 +0200)] 
RELEASE-PROCEDURE.md: update release date

16 months agomanagen: insert final .fi for files ending with a quote
Daniel Stenberg [Fri, 28 Jun 2024 07:01:08 +0000 (09:01 +0200)] 
managen: insert final .fi for files ending with a quote

When an individual file ended with a quote (typically an example), the
render function would return without ending the quote correctly with a
".fi" (fill in) in the manpage output.

This made the additional text provided below to render wrongly.

Closes #14048

16 months agoquic: update to quiche 0.22.0
Junho Choi [Fri, 28 Jun 2024 03:51:25 +0000 (12:51 +0900)] 
quic: update to quiche 0.22.0

quiche 0.22.0 will set SONAME in libquiche.so (libquiche.so.0) for
linux/BSDs. Install a symlink with SONAME.

Closes #14030
Closes #14046

16 months agomanagen: introduce "Multi: per-URL"
Daniel Stenberg [Thu, 27 Jun 2024 20:54:28 +0000 (22:54 +0200)] 
managen: introduce "Multi: per-URL"

For -O, -o and -T that are used once per specified URL.

Closes #14045

16 months agoquiche: fix operand of ‘?:’ changes signedness
Daniel Stenberg [Thu, 27 Jun 2024 11:05:07 +0000 (13:05 +0200)] 
quiche: fix operand of ‘?:’ changes signedness

... from ‘int’ to ‘curl_uint64_t’

Closes #14041

16 months agoGHA: add --enable-werror to the quiche job
Daniel Stenberg [Thu, 27 Jun 2024 10:57:02 +0000 (12:57 +0200)] 
GHA: add --enable-werror to the quiche job

Closes #14041

16 months agoKNOWN_BUGS: three new bugs
Daniel Stenberg [Thu, 27 Jun 2024 14:37:25 +0000 (16:37 +0200)] 
KNOWN_BUGS: three new bugs

These have lingered in the issue tracker for a long time without action.
We don't expect any fixes in the near term either. Move them to the
KNOWN_BUGS document.

Closes #12177
Closes #12171
Closes #13350

Closes #14042

16 months agoCI: add whitespace checker
Viktor Szakats [Thu, 27 Jun 2024 00:38:38 +0000 (02:38 +0200)] 
CI: add whitespace checker

Fix issues detected.

Also:

- One of the `.vc` files used LF EOLs, while the other didn't.
  Make that one also use LF EOLs, as this is apparently supported by
  `nmake`.

- Drop `.dsw` and `.btn` types from `.gitattributes`.
  The repository doesn't use them.

- Sync section order with the rest of files in
  `tests/certs/EdelCurlRoot-ca.prm`.

- Indent/align `.prm` and `.pem` files.

- Delete dummy `[something]` section from `.prm` and `.pem` files.

Mental note:
MSVC `.sln` files seem to accept spaces for indentation and also support
LF line-endings. I cannot test this and I don't know what's more
convenient when updating them, so left them as-is, with specific
exclusions.

Closes #14031

16 months agoCI: fix typo in job name
Viktor Szakats [Thu, 27 Jun 2024 10:38:21 +0000 (12:38 +0200)] 
CI: fix typo in job name

Closes #14040

16 months agotests/httpd: adjust ReadBufferSize for better performance
Stefan Eissing [Thu, 27 Jun 2024 10:03:52 +0000 (12:03 +0200)] 
tests/httpd: adjust ReadBufferSize for better performance

- list httpd and caddy versions in scorecard run

Closes #14039

16 months agoruntests: fix %VERNUM
Daniel Stenberg [Thu, 27 Jun 2024 08:16:59 +0000 (10:16 +0200)] 
runtests: fix %VERNUM

It needs to be set to the leading digits and dots only, so that the
`-[date]` suffix strings are not included, as those used in the daily
snapshots.

Fixes #14035
Reported-by: Marcel Raad
Closes #14036

16 months agoCI/synopsis.yml: run on `.md` files
Philip H [Thu, 27 Jun 2024 08:39:14 +0000 (10:39 +0200)] 
CI/synopsis.yml: run on `.md` files

Reported-by: Viktor Szakats
Fixes #14032
Closes #14037

16 months agoverify-synopsis.pl: work with .md files
Daniel Stenberg [Thu, 27 Jun 2024 09:23:13 +0000 (11:23 +0200)] 
verify-synopsis.pl: work with .md files

Ref: #14037
Closes #14038

16 months agoconncache: done always evaluates to false
Daniel Stenberg [Thu, 27 Jun 2024 06:48:18 +0000 (08:48 +0200)] 
conncache: done always evaluates to false

Follow-up to c9b95c0bb30f88bf00e1ac

Spotted by CodeSonar

Reviewed-by: Stefan Eissing
Closes #14034

16 months agolib: add a few DEBUGASSERT(data) to aid code analyzers
Daniel Stenberg [Thu, 27 Jun 2024 06:45:06 +0000 (08:45 +0200)] 
lib: add a few DEBUGASSERT(data) to aid code analyzers

... where 'data' is assumed to always work.

Closes #14033

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 27 Jun 2024 07:23:38 +0000 (09:23 +0200)] 
RELEASE-NOTES: synced

16 months agotidy-up: use `/usr/bin/env perl` shebang
Viktor Szakats [Wed, 26 Jun 2024 17:59:39 +0000 (19:59 +0200)] 
tidy-up: use `/usr/bin/env perl` shebang

Most Perl scripts already used it. Sync up the few outliers.

Closes #14029

16 months agoquic: openssl quic, cmake and doc version update to 3.3.0
Stefan Eissing [Wed, 26 Jun 2024 13:45:33 +0000 (15:45 +0200)] 
quic: openssl quic, cmake and doc version update to 3.3.0

Closes #14028

16 months agohttp/3: add shutdown support
Stefan Eissing [Wed, 26 Jun 2024 11:45:22 +0000 (13:45 +0200)] 
http/3: add shutdown support

- openssl-quic shutdown handling
- ngtcp2 shutdown handling
- quiche shutdown handling
- add test_19_06 for verfication

Reported-by: Dexter Gerig
Closes #14027
Fixes #14022

16 months agotests: verify managen
Daniel Stenberg [Wed, 26 Jun 2024 08:43:22 +0000 (10:43 +0200)] 
tests: verify managen

1705: verifies the manpage output

1706: verifies the ascii output

Closes #14025

16 months agoruntests: support %DATE for YYYY-MM-DD of right now
Daniel Stenberg [Wed, 26 Jun 2024 09:20:01 +0000 (11:20 +0200)] 
runtests: support %DATE for YYYY-MM-DD of right now

16 months agoruntests: support %VERNUM
Daniel Stenberg [Wed, 26 Jun 2024 09:13:54 +0000 (11:13 +0200)] 
runtests: support %VERNUM

For the plain version number of the built curl without -DEV etc. Only
digits and dots.

16 months agomanagen: only output .RE for manpage output
Daniel Stenberg [Wed, 26 Jun 2024 08:47:16 +0000 (10:47 +0200)] 
managen: only output .RE for manpage output

For ascii they are just rubbish.

Closes #14025

16 months agoquic: enable UDP GRO
Tatsuhiro Tsujikawa [Tue, 25 Jun 2024 09:51:03 +0000 (18:51 +0900)] 
quic: enable UDP GRO

Closes #14012

16 months agoquic: require at least OpenSSL 3.3 for QUIC
Stefan Eissing [Wed, 26 Jun 2024 09:19:26 +0000 (11:19 +0200)] 
quic: require at least OpenSSL 3.3 for QUIC

- when checking for QUIC support in OpenSSL, also check
  for it being at least 3.3.0
- remove workarounds for features buggy or missing in 3.2

Closes #14026

16 months agoFILEFORMAT.md: mentioned <file[num]> for "client"
Daniel Stenberg [Wed, 26 Jun 2024 08:13:16 +0000 (10:13 +0200)] 
FILEFORMAT.md: mentioned <file[num]> for "client"

They can be used to create more files.

Closes #14024

16 months agosystem_win32: add missing curl.h include
Marcel Raad [Tue, 25 Jun 2024 13:07:12 +0000 (15:07 +0200)] 
system_win32: add missing curl.h include

It's required for `CURLcode`.

Closes https://github.com/curl/curl/pull/14019

16 months agoTODO: specify which response codes that make -f/--fail return error
Daniel Stenberg [Tue, 25 Jun 2024 21:27:43 +0000 (23:27 +0200)] 
TODO: specify which response codes that make -f/--fail return error

Suggestion from the user survey 2024

Closes #14020

16 months agolib: graceful connection shutdown
Stefan Eissing [Wed, 19 Jun 2024 10:40:06 +0000 (12:40 +0200)] 
lib: graceful connection shutdown

When libcurl discards a connection there are two phases this may go
through: "shutdown" and "closing". If a connection is aborted, the
shutdown phase is skipped and it is closed right away.

The connection filters attached to the connection implement the phases
in their `do_shutdown()` and `do_close()` callbacks. Filters carry now a
`shutdown` flags next to `connected` to keep track of the shutdown
operation.

Filters are shut down from top to bottom. If a filter is not connected,
its shutdown is skipped. Notable filters that *do* something during
shutdown are HTTP/2 and TLS. HTTP/2 sends the GOAWAY frame. TLS sends
its close notify and expects to receive a close notify from the server.

As sends and receives may EAGAIN on the network, a shutdown is often not
successful right away and needs to poll the connection's socket(s). To
facilitate this, such connections are placed on a new shutdown list
inside the connection cache.

Since managing this list requires the cooperation of a multi handle,
only the connection cache belonging to a multi handle is used. If a
connection was in another cache when being discarded, it is removed
there and added to the multi's cache. If no multi handle is available at
that time, the connection is shutdown and closed in a one-time,
best-effort attempt.

When a multi handle is destroyed, all connection still on the shutdown
list are discarded with a final shutdown attempt and close. In curl
debug builds, the environment variable `CURL_GRACEFUL_SHUTDOWN` can be
set to make this graceful with a timeout in milliseconds given by the
variable.

The shutdown list is limited to the max number of connections configured
for a multi cache. Set via CURLMOPT_MAX_TOTAL_CONNECTIONS. When the
limit is reached, the oldest connection on the shutdown list is
discarded.

- In multi_wait() and multi_waitfds(), collect all connection caches
  involved (each transfer might carry its own) into a temporary list.
  Let each connection cache on the list contribute sockets and
  POLLIN/OUT events it's connections are waiting for.

- in multi_perform() collect the connection caches the same way and let
  them peform their maintenance. This will make another non-blocking
  attempt to shutdown all connections on its shutdown list.

- for event based multis (multi->socket_cb set), add the sockets and
  their poll events via the callback. When `multi_socket()` is invoked
  for a socket not known by an active transfer, forward this to the
  multi's cache for processing. On closing a connection, remove its
  socket(s) via the callback.

TLS connection filters MUST NOT send close nofity messages in their
`do_close()` implementation. The reason is that a TLS close notify
signals a success. When a connection is aborted and skips its shutdown
phase, the server needs to see a missing close notify to detect
something has gone wrong.

A graceful shutdown of FTP's data connection is performed implicitly
before regarding the upload/download as complete and continuing on the
control connection. For FTP without TLS, there is just the socket close
happening. But with TLS, the sent/received close notify signals that the
transfer is complete and healthy. Servers like `vsftpd` verify that and
reject uploads without a TLS close notify.

- added test_19_* for shutdown related tests
- test_19_01 and test_19_02 test for TCP RST packets
  which happen without a graceful shutdown and should
  no longer appear otherwise.
- add test_19_03 for handling shutdowns by the server
- add test_19_04 for handling shutdowns by curl
- add test_19_05 for event based shutdowny by server
- add test_30_06/07 and test_31_06/07 for shutdown checks
  on FTP up- and downloads.

Closes #13976

16 months agomanagen: fix blank line detection
Daniel Stenberg [Tue, 25 Jun 2024 14:28:33 +0000 (16:28 +0200)] 
managen: fix blank line detection

Follow-up to d14a53eea7b87 which ruined the output somewhat.

Closes #14017

16 months agomanagen: output tabs for each 8 leading spaces
Daniel Stenberg [Tue, 25 Jun 2024 11:37:51 +0000 (13:37 +0200)] 
managen: output tabs for each 8 leading spaces

This replacing of eight leading spaces into tabs was already done for
the embedded uncompressed version in tool_hugehelp.c so it does not save
anything there. But the gzip compressed version ends up almost 2K
smaller.

The output in a terminal should be identical.

Before using TABs:

curl.txt 282492 bytes
curl.txt.gz 73261 bytes

With this change applied:

curl.txt 249382 bytes
curl.txt.gz 71470 bytes

Closes #14016

16 months agomanagen: error on trailing blank lines in input files
Daniel Stenberg [Tue, 25 Jun 2024 11:23:37 +0000 (13:23 +0200)] 
managen: error on trailing blank lines in input files

Ref: #14014
Closes #14015

16 months agotidy-up: more whitespace
Viktor Szakats [Tue, 25 Jun 2024 11:12:30 +0000 (13:12 +0200)] 
tidy-up: more whitespace

Closes #14014

16 months agomulti: multi_getsock(), check correct socket
Stefan Eissing [Tue, 25 Jun 2024 09:35:48 +0000 (11:35 +0200)] 
multi: multi_getsock(), check correct socket

 - in phase CONNECTING/TUNNELING/PROTOCONNECT, retrieve
   the socket from the connection filters and do not rely
   on `conn->sockfd` being already set by the transfer.
 - this applies to the default behaviour, a protocol handler
   may override this via its callbacks.
 - add a warning message in multi_getsock() when the transfer
   is expected to have something in its pollset, but instead
   it is empty.

Reported-by: saurabhsingh-dev on github
Fixes #13998
Closes #14011

16 months agomanagen: fix each options footer to end with newline
Daniel Stenberg [Tue, 25 Jun 2024 09:35:48 +0000 (11:35 +0200)] 
managen: fix each options footer to end with newline

A previous change sometimes made a command line option's description not
end with a newline immediately before the next command line.

Also widened the lines to wrap on column 79 instead of 78.

Closes #14010

16 months agowolfssl: assume key_file equal to clientcert in the absence of key_file
Alex Snast [Mon, 24 Jun 2024 21:28:23 +0000 (14:28 -0700)] 
wolfssl: assume key_file equal to clientcert in the absence of key_file

When user sets CURLOPT_SSLCERT but leaves CURLOPT_SSLKEY unset assume
the path passed in CURLOPT_SSLCERT holds the ssl key which is what we do
in openssl implementation.

Fixes #14007
Closes #14008

16 months agoautotools: fix pkg-config names (zstd, ngtcp2*)
Viktor Szakats [Mon, 24 Jun 2024 18:29:02 +0000 (20:29 +0200)] 
autotools: fix pkg-config names (zstd, ngtcp2*)

Also verified that all names now match up with CMake.

Follow-up to f057de5a1a950a90d1920021db152a4b695f1a8a #13911
Follow-up to eeab0ea7aa19af61af881e8a0bf9ff1f2e28ef79 #13994
Reported-by: 李四
Fixes #14005
Closes #14006

16 months agotidy-up: whitespace [ci skip]
Viktor Szakats [Mon, 24 Jun 2024 18:26:34 +0000 (20:26 +0200)] 
tidy-up: whitespace [ci skip]

16 months agocmdline-docs: "added in" cleanups
Daniel Stenberg [Mon, 24 Jun 2024 14:25:40 +0000 (16:25 +0200)] 
cmdline-docs: "added in" cleanups

- markup fixes
- remove some mentions of < 7.60.0 changes

Closes #14003

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 24 Jun 2024 14:34:14 +0000 (16:34 +0200)] 
RELEASE-NOTES: synced

16 months agomanagen: "added in" fixes
Daniel Stenberg [Mon, 24 Jun 2024 11:57:02 +0000 (13:57 +0200)] 
managen: "added in" fixes

 - up the limit: remove all mentions of 7.60 or earlier from manpage
   7.60 is 6 years old now.
 - warn on "broken" added in lines, as they avoid detection
 - fixup added in markup in a few curldown files

Closes #14002

16 months agoconfigure: fix pkg-config library name 'libnghttp3'
Matt Jolly [Mon, 24 Jun 2024 06:49:10 +0000 (16:49 +1000)] 
configure: fix pkg-config library name 'libnghttp3'

Closes #13994

16 months agomanagen: cleanups to generate nicer-looking output
Daniel Stenberg [Mon, 24 Jun 2024 08:53:29 +0000 (10:53 +0200)] 
managen: cleanups to generate nicer-looking output

- output "see also" last
- when there are multiple mutex items, use commas between all of them
  except the last.
- call them mututally exclusive WITH not TO other options.
- remove trailing space from added in, add newline prefix
- smoother language for requires

Closes #14001

16 months agoconfigure: require a QUIC library if nghttp3 is used
Daniel Stenberg [Mon, 24 Jun 2024 08:27:08 +0000 (10:27 +0200)] 
configure: require a QUIC library if nghttp3 is used

Instead of just silently disabling HTTP/3.

Reported-by: Matt Jolly
Fixes #13995
Closes #13999

16 months agodocs/cmdline-opts: remove two superfluous "Added in" mentions
Daniel Stenberg [Mon, 24 Jun 2024 09:08:19 +0000 (11:08 +0200)] 
docs/cmdline-opts: remove two superfluous "Added in" mentions

The key "added in" phrase for the option itself is added automatically.

Closes #14000

16 months agocookie-jar.md: see also --junk-session-cookies
Daniel Stenberg [Mon, 24 Jun 2024 07:36:39 +0000 (09:36 +0200)] 
cookie-jar.md: see also --junk-session-cookies

Closes #13996

16 months agoruntests: support crlf="yes" for the <stderr> section
Daniel Stenberg [Sun, 23 Jun 2024 14:22:40 +0000 (16:22 +0200)] 
runtests: support crlf="yes" for the <stderr> section

16 months agoTODO: -h option
Daniel Stenberg [Sun, 23 Jun 2024 14:05:44 +0000 (16:05 +0200)] 
TODO: -h option

Support "curl -h --insecure" etc to output the manpage section for the
--insecure command line option in the terminal. Should be possible to
work with either long or short versions of command line options.

Closes #13990

16 months agotrace-ascii.md: mention "%" for stderr
Daniel Stenberg [Sun, 23 Jun 2024 14:12:50 +0000 (16:12 +0200)] 
trace-ascii.md: mention "%" for stderr

Closes #13991

16 months agoconnect-to.md: expand with examples
Daniel Stenberg [Sun, 23 Jun 2024 12:12:33 +0000 (14:12 +0200)] 
connect-to.md: expand with examples

- add referer from the resolve section to connect-to if user wants
  wildcard for the port number

Closes #13989

16 months agoTODO: connect to multiple IPs in parallel
Daniel Stenberg [Sun, 23 Jun 2024 09:31:16 +0000 (11:31 +0200)] 
TODO: connect to multiple IPs in parallel

Closes #13986

16 months agodump-header.md: mention minus for stdout
Daniel Stenberg [Sun, 23 Jun 2024 09:33:47 +0000 (11:33 +0200)] 
dump-header.md: mention minus for stdout

Closes #13985

16 months agoCURLOPT_RESOLVE.md: mention hostname can be wildcard ('*')
Daniel Stenberg [Sat, 22 Jun 2024 20:50:15 +0000 (22:50 +0200)] 
CURLOPT_RESOLVE.md: mention hostname can be wildcard ('*')

Closes #13983