]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

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

Closes #14012

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

Closes #14014

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agocf-socket: optimize curlx_nonblock() and check its return error
Andy Pan [Thu, 13 Jun 2024 13:28:01 +0000 (21:28 +0800)] 
cf-socket: optimize curlx_nonblock() and check its return error

Reviewed-by: Stefan Eissing
Closes #13942

2 years agox509asn1: prevent NULL dereference
z2_ [Thu, 20 Jun 2024 19:57:07 +0000 (21:57 +0200)] 
x509asn1: prevent NULL dereference

Closes #13978

2 years agounit2604: use 'unitfail' instead of 'error' variable
Daniel Stenberg [Wed, 19 Jun 2024 07:34:43 +0000 (09:34 +0200)] 
unit2604: use 'unitfail' instead of 'error' variable

Since the framework is already returning that variable by default.
Avoids a warning for unreachable code.

Reported-by: Tal Regev
Fixes #13967
Closes #13973

2 years agoKNOWN_BUGS: TFTP tests fail on OpenBSD
Daniel Stenberg [Wed, 19 Jun 2024 10:02:40 +0000 (12:02 +0200)] 
KNOWN_BUGS: TFTP tests fail on OpenBSD

Closes #13623
Closes #13975

2 years agoVULN-DISCLOSURE-POLICY: NULL dereferences and crashes
Daniel Stenberg [Wed, 19 Jun 2024 09:47:26 +0000 (11:47 +0200)] 
VULN-DISCLOSURE-POLICY: NULL dereferences and crashes

If a malicious server can trigger a NULL dereference in curl or
otherwise cause curl to crash (and nothing worse), chances are big that
we do not consider that a security problem.

Closes #13974

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 19 Jun 2024 09:36:39 +0000 (11:36 +0200)] 
RELEASE-NOTES: synced

2 years agombedtls: support CURLOPT_CERTINFO
Sergey Markelov [Wed, 13 Mar 2024 00:21:06 +0000 (17:21 -0700)] 
mbedtls: support CURLOPT_CERTINFO

Closes #13113

2 years agox509asn1: ASN1tostr() should fail when 'constructed' is set
Daniel Stenberg [Wed, 19 Jun 2024 07:16:56 +0000 (09:16 +0200)] 
x509asn1: ASN1tostr() should fail when 'constructed' is set

This is a regression from my refactor in 623c3a8fa0bdb (#12808)

Follow-up to 623c3a8fa0bdb2751f14b37417

Closes #13972

2 years agox509asn1: remove two static variables
Daniel Stenberg [Wed, 19 Jun 2024 06:59:39 +0000 (08:59 +0200)] 
x509asn1: remove two static variables

cnOID and sanOID were not used outside of the OID table anyway

Closes #13971

2 years agoTODO: TLS channel binding
brian m. carlson [Tue, 18 Jun 2024 08:29:43 +0000 (10:29 +0200)] 
TODO: TLS channel binding

Closes #13483

2 years agocmake: add CURL_USE_GSASL option with detection + CI test
Tal Regev [Fri, 14 Jun 2024 05:09:55 +0000 (08:09 +0300)] 
cmake: add CURL_USE_GSASL option with detection + CI test

Reviewed-by: Viktor Szakats
Closes #13948

2 years agox509asn1: make Curl_extract_certinfo store error message
Daniel Stenberg [Sun, 16 Jun 2024 09:07:40 +0000 (11:07 +0200)] 
x509asn1: make Curl_extract_certinfo store error message

To help us all better understand where the error actually comes from.

Ref: #13958
Closes #13959

2 years agoappveyor: dump build logs on failure in VS2008 jobs
Viktor Szakats [Fri, 14 Jun 2024 15:50:21 +0000 (17:50 +0200)] 
appveyor: dump build logs on failure in VS2008 jobs

This seems to be the only way to see what actual toolchain commands were
run, and with what arguments.

Without `dos2unix`, `cat` output comes out empty.

Closes #13957

2 years agocmake: fix quotes when appending multiple options (SecureTransport)
Viktor Szakats [Fri, 14 Jun 2024 11:10:10 +0000 (13:10 +0200)] 
cmake: fix quotes when appending multiple options (SecureTransport)

Copied from a vcpkg distro patch:
https://github.com/microsoft/vcpkg/blob/02745e0f4749d1f51d2025824209408f5a6c3614/ports/curl/dependencies.patch#L43C38-L44

Ref: https://github.com/microsoft/vcpkg/pull/38847
Ref: https://github.com/microsoft/vcpkg/commit/795f2f137e6cf6d985fcc927bffcaf9c0a96e4ac
Ref: https://github.com/microsoft/vcpkg/pull/38847/commits/36f0c917de5319e95361451fc0aef0698b264874#diff-ab5c23e5dc5df412539cc93e24b37abbc588e1918236f8abc019d676b270c85fR39 (sub-commit)

Authored-by: Kai Pastor
Closes #13953

2 years agoCURLOPT_NETRC.md: clarify what it does on Windows
Daniel Stenberg [Sat, 15 Jun 2024 09:49:40 +0000 (11:49 +0200)] 
CURLOPT_NETRC.md: clarify what it does on Windows

Closes #13956

2 years agoKNOWN_BUGS: "HTTP/2 + TLS spends a lot of time in recv"
Daniel Stenberg [Fri, 14 Jun 2024 21:56:37 +0000 (23:56 +0200)] 
KNOWN_BUGS: "HTTP/2 + TLS spends a lot of time in recv"

Closes #13416
Closes #13955

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 14 Jun 2024 11:30:06 +0000 (13:30 +0200)] 
RELEASE-NOTES: synced

2 years agoexamples: add missing binaries to .gitignore
Yedaya Katsman [Fri, 14 Jun 2024 10:34:53 +0000 (13:34 +0300)] 
examples: add missing binaries to .gitignore

They were showing as changed when built. Add them sorted alphabetically,
while also moving a few more entries to sorted order.

Closes #13952

2 years agodocs: reference non deprecated libcurl options
Yedaya Katsman [Fri, 14 Jun 2024 08:19:32 +0000 (11:19 +0300)] 
docs: reference non deprecated libcurl options

There are a places where man pages reference deprecated CURLOPT options,
where it doesn't make sense, replace them with the reccomended
replacement option.

also remove reference to the removed mesalink TLS backend

Closes #13951

2 years agognutls: pass in SNI name, not hostname when checking cert
Daniel Stenberg [Fri, 14 Jun 2024 06:46:50 +0000 (08:46 +0200)] 
gnutls: pass in SNI name, not hostname when checking cert

The function we use is called 'gnutls_x509_crt_check_hostname()' but if
we pass in the hostname with a trailing dot, the check fails. If we pass
in the SNI name, which cannot have a trailing dot, it succeeds for
https://pyropus.ca./

I consider this as a flaw in GnuTLS and have submitted this issue
upstream:

  https://gitlab.com/gnutls/gnutls/-/issues/1548

In order to work with old and existing GnuTLS versions, we still need
this change no matter how they view the issue or might change it in the
future.

Fixes #13428
Reported-by: Ryan Carsten Schmidt
Closes #13949

2 years agoBINDINGS: update java link to one that exists
Daniel Stenberg [Fri, 14 Jun 2024 07:45:33 +0000 (09:45 +0200)] 
BINDINGS: update java link to one that exists

The previous java binding seems to have vanished. Link to one that still
exists.

Bug: https://github.com/curl/everything-curl/issues/456
Reported-by: Jiang Wenjian
Closes #13950

2 years agoGHA: update pinned actions
renovate[bot] [Thu, 13 Jun 2024 15:18:24 +0000 (15:18 +0000)] 
GHA: update pinned actions

- github/codeql-action digest to 23acc5c
- actions/checkout digest to 692973e
- rojopolis/spellcheck-github-actions digest to d354a4d

Closes #13935
Closes #13945
Closes #13946

2 years agotool_cb_hdr: allow etag and content-disposition for 3xx reply
Jay Satiro [Fri, 26 Apr 2024 06:29:20 +0000 (02:29 -0400)] 
tool_cb_hdr: allow etag and content-disposition for 3xx reply

- Parse etag and content-disposition headers for 3xx replies.

For example, a server may send a content-disposition filename header
with a redirect reply (3xx) but not with the final response (2xx).
Without this change curl would ignore the server's specified filename
and continue to use the filename extracted from the user-specified URL.

Prior to this change, 75d79a4 had limited etag and content-disposition
to 2xx replies only.

Tests-by: Daniel Stenberg
Reported-by: Morgan Willcock
Fixes https://github.com/curl/curl/issues/13302
Closes #13484

2 years agotransfer: set CSELECT_IN if there is data pending
Daniel Stenberg [Thu, 13 Jun 2024 15:02:55 +0000 (17:02 +0200)] 
transfer: set CSELECT_IN if there is data pending

When aborting the transfer loop early, like when there is rate limiting
in effect, there might be buffered data already read off the socket so
the socket might not signal reability. Therefore we must set the
CSELECT_IN manually if data_pending_() suggests there might be more data
to get. This is particularly noticeable with SSH when the underlying
library has drained the socket and holds pending data in its buffer.

Reported-by: alervd on github
Fixes #13695
Closes #13943

2 years agocmake: enable SOVERSION for Cygwin and `CMAKE_DLL_NAME_WITH_SOVERSION`
Viktor Szakats [Thu, 13 Jun 2024 11:43:59 +0000 (13:43 +0200)] 
cmake: enable SOVERSION for Cygwin and `CMAKE_DLL_NAME_WITH_SOVERSION`

- enable SOVERSION when `CMAKE_DLL_NAME_WITH_SOVERSION=ON` is set.
  Ref: https://cmake.org/cmake/help/v3.27/variable/CMAKE_DLL_NAME_WITH_SOVERSION.html
  Use: https://github.com/search?q=-DCMAKE_DLL_NAME_WITH_SOVERSION&type=code

- enable SOVERSION for Cygwin builds by default.

Ref: #13936
Ref: #13944
Closes #13898

2 years agocmake: allow SOVERSION override with `CURL_LIBCURL_SOVERSION`
Viktor Szakats [Thu, 13 Jun 2024 11:43:22 +0000 (13:43 +0200)] 
cmake: allow SOVERSION override with `CURL_LIBCURL_SOVERSION`

Allow overriding SOVERSION with the new CMake option:
`CURL_LIBCURL_SOVERSION=ON/OFF`

For certain target platforms the shared libcurl library filename
contains the SOVERSION. This new option allows to enable/disable
this behavior manually. If set, it takes precedence over the default
setting.

Ref: #13898
Closes #13944

2 years agoDockerfile: update debian:bookworm-slim to 84d83b2
renovate[bot] [Thu, 13 Jun 2024 07:46:58 +0000 (07:46 +0000)] 
Dockerfile: update debian:bookworm-slim to 84d83b2

Closes #13934

2 years agoconfigure: use AC_MSG_WARN for TLS/experimental warning texts
Daniel Stenberg [Thu, 13 Jun 2024 14:08:19 +0000 (16:08 +0200)] 
configure: use AC_MSG_WARN for TLS/experimental warning texts

- no longer warns for mbedtls
- warns for each item on individual lines
- no longer shows irrelevant TLS libraries when multiple are selected
- removes ech repetition

Closes #13941

2 years agoGHA: detect and warn for more English contractions
Daniel Stenberg [Thu, 13 Jun 2024 13:40:39 +0000 (15:40 +0200)] 
GHA: detect and warn for more English contractions

As we try to avoid them in curl documentation

Closes #13940

2 years agotransfer: do not use EXPIRE_NOW while blocked
Stefan Eissing [Fri, 7 Jun 2024 12:38:51 +0000 (14:38 +0200)] 
transfer: do not use EXPIRE_NOW while blocked

- When a transfer sets `data->state.select_bits`, it is
  scheduled for rerun with EXPIRE_NOW. If such a transfer
  is blocked (due to PAUSE, for example), this will lead to
  a busy loop.
- multi.c: check for transfer block
- sendf.*: add Curl_xfer_is_blocked()
- sendf.*: add client reader `is_paused()` callback
- implement is_paused()` callback where needed

Closes #13908

2 years agoci: update dependency ngtcp2/ngtcp2 to v1.6.0
renovate[bot] [Thu, 13 Jun 2024 11:39:21 +0000 (11:39 +0000)] 
ci: update dependency ngtcp2/ngtcp2 to v1.6.0

Closes #13939

2 years agoci: update ngtcp2/nghttp3 to v1.4.0
renovate[bot] [Thu, 13 Jun 2024 11:39:16 +0000 (11:39 +0000)] 
ci: update ngtcp2/nghttp3 to v1.4.0

Closes #13938

2 years agocmake: stop setting SOVERSION for the static lib target
Viktor Szakats [Thu, 13 Jun 2024 09:34:28 +0000 (11:34 +0200)] 
cmake: stop setting SOVERSION for the static lib target

Also move the logic closer to its use and related tidy-ups.

Cherry-picked from #13898
Closes #13936

2 years agoos400: make it compilable again
Patrick Monnerat [Wed, 12 Jun 2024 12:18:16 +0000 (14:18 +0200)] 
os400: make it compilable again

A newly introduced use of getsockname() in the cli tool makes it require
the ascii wrapper module, which is not available outside of the library:
as the tool only uses the address family field (binary), disable
wrappers outside of libcurl.

Fix setsockopt() parameter type mismatch using a (void *) cast.

Sync ILE/RPG binding.

Closes #13930

2 years agolibcurl.pc: add `Requires.private`, `Requires` for static linking
Viktor Szakats [Fri, 7 Jun 2024 22:41:24 +0000 (00:41 +0200)] 
libcurl.pc: add `Requires.private`, `Requires` for static linking

- cmake: populate for dependencies.
- autotools: populate for dependencies.
  (including mbedtls, though the script does not detect
  mbedtls through pkgconfig. mbedtls 3.6.0 now supports it.)

Skip dealing with gssapi in this patch.

Fixes #864
Closes #13911

2 years agocmake: bring `curl-config.cmake` closer to `FindCURL`
Viktor Szakats [Wed, 5 Jun 2024 20:35:48 +0000 (22:35 +0200)] 
cmake: bring `curl-config.cmake` closer to `FindCURL`

Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
https://github.com/Kitware/CMake/blob/b411d0146c2e06acfb0c823bb039e99f0191b611/Modules/FindCURL.cmake#L209

For dependent projects, CMake's suggestion is to replace
`CURL_LIBRARIES` with `CURL::libcurl`, and drop `CURL_INCLUDE_DIRS`.

Reported-by: Aurélien Pierre
Ref: https://curl.se/mail/lib-2024-06/0014.html
Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/24580
Closes #13897

2 years agotool_getparam: fix the bsearch call for ip-tos names
Daniel Stenberg [Wed, 12 Jun 2024 22:36:40 +0000 (00:36 +0200)] 
tool_getparam: fix the bsearch call for ip-tos names

Follow-up to 3c20ae08b9591
Reported-by: Samuel Chiang
Fixes #13932
Closes #13933

2 years agorequest: change the struct field bodywrites to a bool, only for hyper
Daniel Stenberg [Wed, 12 Jun 2024 09:20:00 +0000 (11:20 +0200)] 
request: change the struct field bodywrites to a bool, only for hyper

Only hyper needs to know this, and it can use it as a boolean.

Closes #13928

2 years agotest: fix CURLOPT_TCP_KEEPCNT typo
Andy Pan [Wed, 12 Jun 2024 13:23:27 +0000 (21:23 +0800)] 
test: fix CURLOPT_TCP_KEEPCNT typo

Follow up to b77d627d242

Closes #13931

2 years agohttp: remove "struct HTTP"
Daniel Stenberg [Wed, 12 Jun 2024 09:05:44 +0000 (11:05 +0200)] 
http: remove "struct HTTP"

It is not actually used anymore and only contained a dummy struct field.
Remove all traces and uses of it.

Closes #13927

2 years agocd2nroff: convert two warnings to errors
Daniel Stenberg [Wed, 12 Jun 2024 09:38:13 +0000 (11:38 +0200)] 
cd2nroff: convert two warnings to errors

Since the warnings tend to get missed too easily and these are problems
we rather want addressed than letting slide.

Closes #13929

2 years agourlapi: use a correct value for CURLU_NO_GUESS_SCHEME
Daniel Stenberg [Wed, 12 Jun 2024 09:06:34 +0000 (11:06 +0200)] 
urlapi: use a correct value for CURLU_NO_GUESS_SCHEME

It was mistakenly set to the same value as CURLU_GET_EMPTY uses.

Reported-by: Patrick Monnerat
Bug: https://github.com/curl/curl/commit/655d44d139489625e77cf6790d36
Closes #13926

2 years agofile: separate fake headers and body with a stand-alone CRLF
Daniel Stenberg [Wed, 12 Jun 2024 06:55:07 +0000 (08:55 +0200)] 
file: separate fake headers and body with a stand-alone CRLF

Instead of bolting on the extra CRLF to the final header - as that makes
the behavior inconsistent and not as documented. The final CRLF is now
also made unconditional, just like it is for HTTP.

Reported-by: dogma
Bug: https://curl.se/mail/lib-2024-06/0033.html
Closes #13925

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 12 Jun 2024 07:37:36 +0000 (09:37 +0200)] 
RELEASE-NOTES: synced

2 years agotcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt
Andy Pan [Wed, 5 Jun 2024 03:30:16 +0000 (11:30 +0800)] 
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt

Closes #13885

2 years agoTODO: make it "Add missing features to TLS backends"
Daniel Stenberg [Tue, 11 Jun 2024 21:26:42 +0000 (23:26 +0200)] 
TODO: make it "Add missing features to TLS backends"

... instead of just mentioning CA caching.

Closes #13924

2 years agocurl: support VLAN Priority: --vlan-priority
Orgad Shaneh [Tue, 14 May 2024 06:54:26 +0000 (09:54 +0300)] 
curl: support VLAN Priority: --vlan-priority

Add --vlan-priority option to the command line tool for setting VLAN
priority.

Closes #13907

2 years agomisc: fix typos
RainRat [Tue, 11 Jun 2024 17:16:50 +0000 (10:16 -0700)] 
misc: fix typos

Closes #13923

2 years agoCURLOPT_ECH.md: remove repeated 'if'
Daniel Stenberg [Tue, 11 Jun 2024 12:19:52 +0000 (14:19 +0200)] 
CURLOPT_ECH.md: remove repeated 'if'

Closes #13922