]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
21 months agodocs: add necessary setup for nghttp3
Jiawen Geng [Sun, 4 Feb 2024 09:19:46 +0000 (17:19 +0800)] 
docs: add necessary setup for nghttp3

Now nghttp3 has submodules
https://github.com/ngtcp2/nghttp3/blob/main/.gitmodules

Closes #12859

21 months agoversion: allow building with ancient libpsl
Peter Krefting [Fri, 2 Feb 2024 22:22:32 +0000 (23:22 +0100)] 
version: allow building with ancient libpsl

The psl_check_version_number() API was added in libpsl 0.11.0. CentOS 7
ships with version 0.7.0 which lacks this API. Revert to using the older
versioning API if we detect an old libpsl version.

Follow-up to 72bd88adde0e8cf6e63644a7d6df1da01a399db4
Bug: https://curl.se/mail/archive-2024-02/0004.html
Reported-by: Scott Mutter
Closes #12872

21 months agoTODO: Support latest rustls
Daniel Stenberg [Tue, 6 Feb 2024 07:58:52 +0000 (08:58 +0100)] 
TODO: Support latest rustls

Closes #12737
Closes #12874

21 months agodocs: make curldown do angle brackets like markdown
Daniel Stenberg [Mon, 5 Feb 2024 22:23:56 +0000 (23:23 +0100)] 
docs: make curldown do angle brackets like markdown

Make sure we use \< and \> in markdown all over so that it renders
correctly, on GitHub and elsewhere. cd2nroff now outputs a warning if it
finds an unescaled angle bracket.

Ref: #12854
Closes #12869

21 months agodocs: fix the --disable-docs for autotools
Daniel Stenberg [Mon, 5 Feb 2024 23:00:35 +0000 (00:00 +0100)] 
docs: fix the --disable-docs for autotools

Follow-up to 541321507e386

Closes #12870

21 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 5 Feb 2024 23:14:44 +0000 (00:14 +0100)] 
RELEASE-NOTES: synced

21 months agolibcurl-security.md: Active FTP passes on the local IP address
Daniel Stenberg [Mon, 5 Feb 2024 18:30:48 +0000 (19:30 +0100)] 
libcurl-security.md: Active FTP passes on the local IP address

Reported-by: Harry Sintonen
Closes #12867

21 months agoconfigure: do not link with nghttp3 unless necessary
Stefan Eissing [Mon, 5 Feb 2024 16:02:21 +0000 (17:02 +0100)] 
configure: do not link with nghttp3 unless necessary

Fixes #12833
Closes #12864
Reported-by: Ryan Carsten Schmidt
21 months agoTHANKS: add Dmitry Tretyakov
Daniel Stenberg [Mon, 5 Feb 2024 22:46:26 +0000 (23:46 +0100)] 
THANKS: add Dmitry Tretyakov

... since I missed to give credit to the report in the fix of #12861

21 months agoopenssl-quic: check on Windows that socket conv to int is possible
Stefan Eissing [Mon, 5 Feb 2024 16:29:24 +0000 (17:29 +0100)] 
openssl-quic: check on Windows that socket conv to int is possible

Fixes #12861
Closes #12865

21 months agotool_cb_hdr: only parse etag + content-disposition for 2xx
Daniel Stenberg [Mon, 5 Feb 2024 18:24:50 +0000 (19:24 +0100)] 
tool_cb_hdr: only parse etag + content-disposition for 2xx

... and ignore them for other response codes.

Reported-by: Harry Sintonen
Closes #12866

21 months agomd4: include strdup.h for the memdup proto
Daniel Stenberg [Mon, 5 Feb 2024 14:22:08 +0000 (15:22 +0100)] 
md4: include strdup.h for the memdup proto

Reported-by: Erik Schnetter
Fixes #12849
Closes #12863

21 months agodocs: add missing slashes to SChannel client certificate documentation
Joel Depooter [Sat, 3 Feb 2024 01:58:04 +0000 (17:58 -0800)] 
docs: add missing slashes to SChannel client certificate documentation

When setting the CURLOPT_SSLCERT option to a certificate thumprint, it
is required to have a backslash between the "store location", "store
name" and "thumbprint" tokens. These slashes were present in the
previous documentation, but were missed in the transition to markdown
documentation.

Closes #12854

21 months agoHTTP/2: write response directly
Stefan Eissing [Wed, 31 Jan 2024 15:30:54 +0000 (16:30 +0100)] 
HTTP/2: write response directly

- use the new `Curl_xfer_write_resp()` to write incoming responses
  directly to the client
- eliminates `stream->recvbuf`
- memory consumption on parallel transfers minimized

Closes #12828

21 months agocookie.md: provide an example sending a fixed cookie
Daniel Stenberg [Mon, 5 Feb 2024 18:42:58 +0000 (19:42 +0100)] 
cookie.md: provide an example sending a fixed cookie

Closes #12868

21 months agoALTSVC.md: correct a typo
Lars Kellogg-Stedman [Fri, 2 Feb 2024 17:51:19 +0000 (12:51 -0500)] 
ALTSVC.md: correct a typo

The ALPN documentation erroneously referred to a "host number" instead
of a "port number".

Closes #12852

21 months agoproxy1.0.md: fix example
Boris Verkhovskiy [Sat, 3 Feb 2024 09:05:16 +0000 (01:05 -0800)] 
proxy1.0.md: fix example

Closes #12856

21 months agoconfigure: add --disable-docs flag
Chris Webb [Sat, 3 Feb 2024 21:05:59 +0000 (21:05 +0000)] 
configure: add --disable-docs flag

Building man pages from curldown sources now requires perl. Add a
--disable-docs flag to configure to enable building and installing
without documentation where perl is not available or man pages are not
required. This is selected automatically (with a warning) when perl is
not found by configure.

Fixes #12832
Closes #12857

21 months agoconnect.c: fix typo
Faraz Fallahi [Sun, 4 Feb 2024 00:20:35 +0000 (16:20 -0800)] 
connect.c: fix typo

Closes #12858

21 months agosendf: ignore response body to HEAD
Daniel Stenberg [Thu, 1 Feb 2024 12:23:12 +0000 (13:23 +0100)] 
sendf: ignore response body to HEAD

and mark the stream for close, but return OK since the response this far
was ok - if headers were received. Partly because this is what curl has
done traditionally.

Test 499 verifies. Updates test 689.

Reported-by: Sergey Bronnikov
Bug: https://curl.se/mail/lib-2024-02/0000.html
Closes #12842

21 months agoftp: treat a 226 arriving before data as a signal to read data
Daniel Stenberg [Thu, 1 Feb 2024 10:28:22 +0000 (11:28 +0100)] 
ftp: treat a 226 arriving before data as a signal to read data

For active mode transfers.

Due to some interesting timing, curl can sometimes get the 226 (transfer
complete) over the control channel first, before the data connection
signals readability. If this happens, use that as a signal to check the
data connection.

Additionally, set the socket filter in listen mode *before* the
PORT/EPRT command is issued, to reduce the risk that the little time gap
could interfere.

This issue never reproduced for me on Debian and takes several hundred
rounds for me to trigger on my mac.

Reported-by: Stefan Eissing
Fixes #12823
Closes #12841

21 months agoOS400: avoid using awk in the build scripts
Patrick Monnerat [Wed, 31 Jan 2024 13:04:41 +0000 (14:04 +0100)] 
OS400: avoid using awk in the build scripts

Awk is a PASE program and its use may cause a failure depending on the
CCSID of the calling script (IBM bug?).

For this reason, revert to an sed-only solution to extract the exported
symbols from the header files.

Closes #12826

21 months agodocs: remove `mk-ca-bundle.1` from `man_MANS`
Jan Macku [Thu, 1 Feb 2024 13:18:12 +0000 (14:18 +0100)] 
docs: remove `mk-ca-bundle.1` from `man_MANS`

It was accidentally added in https://github.com/curl/curl/pull/12730

Co-authored-by: Lukáš Zaoral <lzaoral@redhat.com>
Signed-off-by: Jan Macku <jamacku@redhat.com>
Follow-up to eefcc1bda4bccd800f5a56a0fe17a2f44a96e88b
Closes #12843

21 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 1 Feb 2024 13:47:09 +0000 (14:47 +0100)] 
RELEASE-NOTES: synced

and bump to 8.6.1 for now

21 months agocmdline-docs/Makefile: avoid using a fixed temp file name
Daniel Stenberg [Thu, 1 Feb 2024 09:53:29 +0000 (10:53 +0100)] 
cmdline-docs/Makefile: avoid using a fixed temp file name

By appending the pid number two different runs at the same time will not
trample over the same file.

Reported-by: Jon Rumsey
Fixes #12829
Closes #12839

21 months agoasyn-thread: use wakeup_close to close the read descriptor
Daniel Stenberg [Thu, 1 Feb 2024 08:36:19 +0000 (09:36 +0100)] 
asyn-thread: use wakeup_close to close the read descriptor

Reported-by: Dan Fandrich
Ref: #12834
Closes #12836

21 months agontml_wb: fix buffer type typo
Stefan Eissing [Wed, 31 Jan 2024 11:14:34 +0000 (12:14 +0100)] 
ntml_wb: fix buffer type typo

Closes #12825

21 months agotool_operate: do not set CURLOPT_QUICK_EXIT in debug builds
Daniel Stenberg [Thu, 1 Feb 2024 08:34:41 +0000 (09:34 +0100)] 
tool_operate: do not set CURLOPT_QUICK_EXIT in debug builds

Since it allows (small) memory leaks that interfere with torture tests
and regular memory-leak checks.

Reported-by: Dan Fandrich
Fixes #12834
Closes #12835

21 months agoform-string.md: correct the example
Boris Verkhovskiy [Wed, 31 Jan 2024 09:34:19 +0000 (01:34 -0800)] 
form-string.md: correct the example

Closes #12822

21 months agoRELEASE-NOTES: synced curl-8_6_0
Daniel Stenberg [Wed, 31 Jan 2024 07:02:47 +0000 (08:02 +0100)] 
RELEASE-NOTES: synced

curl 8.6.0

21 months agoTHANKS: new contributors from 8.5.0
Daniel Stenberg [Wed, 31 Jan 2024 07:02:47 +0000 (08:02 +0100)] 
THANKS: new contributors from 8.5.0

21 months agocd2nroff: use perl 'strict' and 'warnings'
Jay Satiro [Mon, 29 Jan 2024 23:57:10 +0000 (18:57 -0500)] 
cd2nroff: use perl 'strict' and 'warnings'

- Use strict and warnings pragmas.

- If open() fails then show the reason.

- Set STDIN io layer :crlf so that input is properly read on Windows.

- When STDIN is used as input, the filename $f is now set to "STDIN".

Various error messages in single() use $f for the filename and this way
it is not undefined when STDIN.

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

21 months agocd2nroff: fix duplicate output issue
Daniel Stenberg [Mon, 29 Jan 2024 21:39:33 +0000 (22:39 +0100)] 
cd2nroff: fix duplicate output issue

Assisted-by: Jay Satiro
Fixes https://github.com/curl/curl-www/issues/321
Closes #12818

21 months agolib: error out on multissl + http3
Daniel Stenberg [Fri, 26 Jan 2024 15:59:33 +0000 (16:59 +0100)] 
lib: error out on multissl + http3

Since the QUIC/h3 code has no knowledge or handling of multissl it might
bring unintended consequences if we allow it.

configure, cmake and curl_setup.h all now reject this combination.

Assisted-by: Viktor Szakats
Assisted-by: Gisle Vanem
Ref: #12806
Closes #12807

21 months agoOS400: sync ILE/RPG binding
Patrick Monnerat [Mon, 29 Jan 2024 11:10:17 +0000 (12:10 +0100)] 
OS400: sync ILE/RPG binding

Also do not force git CRLF line endings on *.cmd files for OS400.

Closes #12815

21 months agobuild: delete/replace 3 more clang warning pragmas
Viktor Szakats [Sun, 28 Jan 2024 00:06:37 +0000 (00:06 +0000)] 
build: delete/replace 3 more clang warning pragmas

- tool_msgs: delete redundant `-Wformat-nonliteral` suppression pragma.

- whitespace formatting in `mprintf.h`, lib518, lib537.

- lib518: fix wrong variable in `sizeof()`.

- lib518: bump variables to `rlim_t`.
  Follow-up to e2b394106d543c4615a60795b7fdce04bd4e5090 #1469

- lib518: sync error message with lib537
  Follow-up to 365322b8bcf9efb6a361473d227b70f2032212ce

- lib518, lib537: replace `-Wformat-nonliteral` suppression pragmas
  by reworking test code.

Follow-up to 5b286c250829e06a135a6ba998e80beb7f43a734 #12812
Follow-up to aee4ebe59161d0a5281743f96e7738ad97fe1cd4 #12803
Follow-up to 09230127589eccc7e01c1a7217787ef8e64f3328 #12540
Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489

Reviewed-by: Daniel Stenberg
Closes #12814

21 months agocmake: freshen up docs/INSTALL.cmake
Richard Levitte [Wed, 24 Jan 2024 12:07:00 +0000 (13:07 +0100)] 
cmake: freshen up docs/INSTALL.cmake

- Turn docs/INSTALL.cmake into a proper markdown file,
  docs/INSTALL-CMAKE.md
- Move things around to divide the description into configuration,
  building and installing sections
- Mention the more modern cmake options to configure, build and install,
  but also retain the older variants as fallbacks

Closes #12772

21 months agobuild: delete/replace clang warning pragmas
Viktor Szakats [Sat, 27 Jan 2024 17:40:38 +0000 (17:40 +0000)] 
build: delete/replace clang warning pragmas

- delete redundant warning suppressions for `-Wformat-nonliteral`.
  This now relies on `CURL_PRINTF()` and it's theoratically possible
  that this macro isn't active but the warning is. We're ignoring this
  as a corner-case here.

- replace two pragmas with code changes to avoid the warnings.

Follow-up to aee4ebe59161d0a5281743f96e7738ad97fe1cd4 #12803
Follow-up to 09230127589eccc7e01c1a7217787ef8e64f3328 #12540
Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489

Reviewed-by: Daniel Stenberg
Closes #12812

21 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 27 Jan 2024 21:02:50 +0000 (22:02 +0100)] 
RELEASE-NOTES: synced

21 months agohttp: only act on 101 responses when they are HTTP/1.1
Daniel Stenberg [Sat, 27 Jan 2024 12:54:10 +0000 (13:54 +0100)] 
http: only act on 101 responses when they are HTTP/1.1

For 101 responses claiming to be any other protocol, bail out. This
would previously trigger an assert.

Add test 1704 to verify.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66184
Closes #12811

21 months ago_VARIABLES.md: add missing 'be' into the sentence
Scarlett McAllister [Sat, 27 Jan 2024 01:10:49 +0000 (21:10 -0400)] 
_VARIABLES.md: add missing 'be' into the sentence

Closes #12809

21 months agomqtt, remove remaining use of data->state.buffer
Stefan Eissing [Fri, 26 Jan 2024 08:21:37 +0000 (09:21 +0100)] 
mqtt, remove remaining use of data->state.buffer

Closes #12799

21 months agox509asn1: switch from malloc to dynbuf
Daniel Stenberg [Fri, 26 Jan 2024 14:02:19 +0000 (15:02 +0100)] 
x509asn1: switch from malloc to dynbuf

Closes #12808

21 months agox509asn1: make utf8asn1str() use dynbuf instead of malloc + memcpy
Daniel Stenberg [Fri, 26 Jan 2024 10:49:21 +0000 (11:49 +0100)] 
x509asn1: make utf8asn1str() use dynbuf instead of malloc + memcpy

Closes #12808

21 months agox509asn1: reduce malloc in Curl_extract_certinfo
Daniel Stenberg [Fri, 26 Jan 2024 10:30:25 +0000 (11:30 +0100)] 
x509asn1: reduce malloc in Curl_extract_certinfo

Using dynbuf

Closes #12808

21 months agoTHANKS: add Alexander Bartel and Brennan Kinney
Jay Satiro [Sat, 27 Jan 2024 07:07:05 +0000 (02:07 -0500)] 
THANKS: add Alexander Bartel and Brennan Kinney

They reported and investigated #10259 which was fixed by 7b2d98df.

Ref: https://github.com/curl/curl/issues/10259

21 months agokrb5: add prototype to silence clang warnings on mvsnprintf()
Daniel Stenberg [Fri, 26 Jan 2024 09:46:17 +0000 (10:46 +0100)] 
krb5: add prototype to silence clang warnings on mvsnprintf()

"error: format string is not a string literal"

Follow-up to 09230127589eccc7 which made the warning appear

Assisted-by: Viktor Szakats
Closes #12803

21 months agox509asn1: remove code for WANT_VERIFYHOST
Daniel Stenberg [Fri, 26 Jan 2024 10:00:21 +0000 (11:00 +0100)] 
x509asn1: remove code for WANT_VERIFYHOST

No code ever sets this anymore since we dropped gskit

Follow-up to 78d6232f1f326b9ab4d

Closes #12804

21 months agosocks: reduce the buffer size to 600 (from 8K)
Daniel Stenberg [Fri, 26 Jan 2024 07:54:08 +0000 (08:54 +0100)] 
socks: reduce the buffer size to 600 (from 8K)

This is malloc'ed memory and it does not more. Test 742 helps us verify
this.

Closes #12789

21 months agofile+ftp: use stack buffers instead of data->state.buffer
Stefan Eissing [Thu, 25 Jan 2024 14:06:44 +0000 (15:06 +0100)] 
file+ftp: use stack buffers instead of data->state.buffer

Closes #12789

21 months agovtls: receive max buffer
Stefan Eissing [Fri, 26 Jan 2024 09:10:11 +0000 (10:10 +0100)] 
vtls: receive max buffer

- do not only receive one TLS record, but try to fill
  the passed buffer
- consider <4K remaning space is "filled".

Closes #12801

21 months agodocs: do not start lines/sentences with So, But nor And
Daniel Stenberg [Fri, 26 Jan 2024 09:19:30 +0000 (10:19 +0100)] 
docs: do not start lines/sentences with So, But nor And

Closes #12802

21 months agodocs: remove spurious ampersands from markdown
Daniel Stenberg [Fri, 26 Jan 2024 08:54:48 +0000 (09:54 +0100)] 
docs: remove spurious ampersands from markdown

They were leftovers from the nroff conversion.

Follow-up to eefcc1bda4bccd800f5a5

Closes #12800

21 months agosasl: make login option string override http auth
Patrick Monnerat [Thu, 25 Jan 2024 12:58:19 +0000 (13:58 +0100)] 
sasl: make login option string override http auth

- Use http authentication mechanisms as a default, not a preset.

Consider http authentication options which are mapped to SASL options as
a default (overriding the hardcoded default mask for the protocol) that
is ignored if a login option string is given.

Prior to this change, if some HTTP auth options were given, sasl mapped
http authentication options to sasl ones but merged them with the login
options.

That caused problems with the cli tool that sets the http login option
CURLAUTH_BEARER as a side-effect of --oauth2-bearer, because this flag
maps to more than one sasl mechanisms and the latter cannot be cleared
individually by the login options string.

New test 992 checks this.

Fixes https://github.com/curl/curl/issues/10259
Closes https://github.com/curl/curl/pull/12790

21 months agosocks: use own buffer instead of data->state.buffer
Stefan Eissing [Thu, 25 Jan 2024 13:56:57 +0000 (14:56 +0100)] 
socks: use own buffer instead of data->state.buffer

Closes #12788

21 months agosocks: fix generic output string to say SOCKS instead of SOCKS4
Daniel Stenberg [Thu, 25 Jan 2024 21:15:58 +0000 (22:15 +0100)] 
socks: fix generic output string to say SOCKS instead of SOCKS4

... since it was also logged for SOCKS5.

Closes #12797

21 months agotest742: test SOCKS5 with max length user, password and hostname
Daniel Stenberg [Thu, 25 Jan 2024 21:14:53 +0000 (22:14 +0100)] 
test742: test SOCKS5 with max length user, password and hostname

Adjusted the socksd server accordingly to allow for configuring that
long user name and password.

Closes #12797

21 months agossh: use stack scratch buffer for seeks
Stefan Eissing [Thu, 25 Jan 2024 14:47:08 +0000 (15:47 +0100)] 
ssh: use stack scratch buffer for seeks

- instead of data->state.buffer

Closes #12794

21 months agokrb5: access the response buffer correctly
Daniel Stenberg [Thu, 25 Jan 2024 15:10:03 +0000 (16:10 +0100)] 
krb5: access the response buffer correctly

As the pingpong code no longer uses the download buffer.

Folllow-up to c2d973627bab12ab
Pointed-out-by: Stefan Eissing
Closes #12796

21 months agomqtt: use stack scratch buffer for recv+publish
Stefan Eissing [Thu, 25 Jan 2024 14:33:54 +0000 (15:33 +0100)] 
mqtt: use stack scratch buffer for recv+publish

- instead of data->state.buffer

Closes #12792

21 months agotelnet, use stack scratch buffer for do
Stefan Eissing [Thu, 25 Jan 2024 14:43:14 +0000 (15:43 +0100)] 
telnet, use stack scratch buffer for do

- instead of data->state.buffer

Closes #12793

21 months agohttp, use stack scratch buffer
Stefan Eissing [Thu, 25 Jan 2024 14:14:23 +0000 (15:14 +0100)] 
http, use stack scratch buffer

- instead of data->state.buffer

Closes #12791

21 months agontlm_wb: do not use data->state.buf any longer
Stefan Eissing [Thu, 25 Jan 2024 12:01:28 +0000 (13:01 +0100)] 
ntlm_wb: do not use data->state.buf any longer

Closes #12787

21 months agogitignore: the generated `libcurl-symbols.md`
Stefan Eissing [Thu, 25 Jan 2024 14:49:40 +0000 (15:49 +0100)] 
gitignore: the generated `libcurl-symbols.md`

Closes #12795

21 months agotool: fix the listhelp generation command
Daniel Stenberg [Thu, 25 Jan 2024 10:14:29 +0000 (11:14 +0100)] 
tool: fix the listhelp generation command

The previous command line to generate the tool_listhelp.c source file
broke with 2494b8dd5175cee7.

Make 'make listhelp' invoked in src/ generate it. Also update the
comment in the file to mention the right procedure.

Closes #12786

21 months agohttp: check for "Host:" case insensitively
Daniel Stenberg [Thu, 25 Jan 2024 08:05:19 +0000 (09:05 +0100)] 
http: check for "Host:" case insensitively

When checking if the user wants to replace the header, the check should
be case insensitive.

Adding test 461 to verify

Found-by: Dan Fandrich
Ref: #12782
Closes #12784

21 months agoconfigure: add libngtcp2_crypto_boringssl detection
Tatsuhiro Tsujikawa [Wed, 24 Jan 2024 08:56:24 +0000 (17:56 +0900)] 
configure: add libngtcp2_crypto_boringssl detection

If OpenSSL is found to be BoringSSL or AWS-LC, and ngtcp2 is requested,
try to detect libngtcp2_crypto_boringssl.

Reported-by: ウさん
Fixes #12724
Closes #12769

21 months agohttp: remove comment reference to a removed solution
Daniel Stenberg [Thu, 25 Jan 2024 09:43:24 +0000 (10:43 +0100)] 
http: remove comment reference to a removed solution

Follow-up to 58974d25d

Closes #12785

21 months agopytest: Scorecard tracking CPU and RSS
Stefan Eissing [Fri, 19 Jan 2024 14:37:46 +0000 (15:37 +0100)] 
pytest: Scorecard tracking CPU and RSS

Closes #12765

21 months agoGHA: bump ngtcp2, gnutls, mod_h2, quiche
Graham Campbell [Thu, 25 Jan 2024 02:09:17 +0000 (02:09 +0000)] 
GHA: bump ngtcp2, gnutls, mod_h2, quiche

- ngtcp2 to v1.2.0
- gnutls to 3.8.3
- mod_h2 to 2.0.26
- quiche to 0.20.0

Closes #12778
Closes #12779
Closes #12780
Closes #12781

21 months agoftpserver.pl: send 213 SIZE response without spurious newline
Daniel Stenberg [Tue, 23 Jan 2024 12:01:37 +0000 (13:01 +0100)] 
ftpserver.pl: send 213 SIZE response without spurious newline

21 months agopingpong: stop using the download buffer
Daniel Stenberg [Sun, 21 Jan 2024 23:04:47 +0000 (00:04 +0100)] 
pingpong: stop using the download buffer

The pingpong logic now uses its own dynbuf for receiving command
response data.

When the "final" response header for a commanad has been received, that
final line is left first in the recvbuf for the protocols to parse at
will. If there is additional data behind the final response line, the
'overflow' counter is indicate how many bytes.

Closes #12757

21 months agogen.pl: remove bold from .IP used for ##
Daniel Stenberg [Thu, 25 Jan 2024 00:01:46 +0000 (01:01 +0100)] 
gen.pl: remove bold from .IP used for ##

Reported-by: Viktor Szakats
Fixes #12776
Closes #12777

21 months agocmake: rework options to enable curl and libcurl docs
Viktor Szakats [Wed, 24 Jan 2024 12:25:15 +0000 (12:25 +0000)] 
cmake: rework options to enable curl and libcurl docs

Rework CMake options for building/using curl tool and libcurl manuals.

- rename `ENABLE_MANUAL` to `ENABLE_CURL_MANUAL`, meaning:
  to build man page and built-in manual for curl tool.

- rename `BUILD_DOCS` to `BUILD_LIBCURL_DOCS`, meaning:
  to build man pages for libcurl.

- `BUILD_LIBCURL_DOCS` now works without having to enable
  `ENABLE_CURL_MANUAL` too.

- drop support for existing CMake-level `USE_MANUAL` option to avoid
  confusion. (It used to work with the effect of current
  `ENABLE_CURL_MANUAL`, but only by accident.)

Assisted-by: Richard Levitte
Ref: #12771
Closes #12773

21 months agourlapi: remove assert
Daniel Stenberg [Wed, 24 Jan 2024 12:15:18 +0000 (13:15 +0100)] 
urlapi: remove assert

This assert triggers wrongly when CURLU_GUESS_SCHEME and
CURLU_NO_AUTHORITY are both set and the URL is a single path.

I think this assert has played out its role. It was introduced in a
rather big refactor.

Follow-up to 4cfa5bcc9a

Reported-by: promptfuzz_ on hackerone
Closes #12775

21 months agotests: avoid int/size_t conversion size/sign warnings
Patrick Monnerat [Wed, 24 Jan 2024 08:51:09 +0000 (09:51 +0100)] 
tests: avoid int/size_t conversion size/sign warnings

Closes #12768

21 months agoGHA: add a job scanning for "bad words" in markdown
Daniel Stenberg [Tue, 23 Jan 2024 14:12:09 +0000 (15:12 +0100)] 
GHA: add a job scanning for "bad words" in markdown

This means words, phrases or things we have decided not to use - words that
are spelled right according to the dictionary but we want to avoid. In the
name of consistency and better documentation.

Closes #12764

21 months agocmake: speed up curldown processing, enable by default
Viktor Szakats [Tue, 23 Jan 2024 06:40:11 +0000 (06:40 +0000)] 
cmake: speed up curldown processing, enable by default

- cmake: enable `BUILD_DOCS` by default (this controls converting and
  installing `.3` files from `.md` sources)

- cmake: speed up generating `.3` files by using a single command per
  directory, instead of a single command per file. This reduces external
  commands by about a thousand. (There remains some CMake logic kicking
  in resulting in 500 -one per file- external `-E touch_nocreate` calls.)

- cd2nroff: add ability to process multiple input files.

- cd2nroff: add `-k` option to use the source filename to form the
  output filename. (instead of the default in-file `Title:` line.)

Follow-up to 3f08d80b2244524646ce86915c585509ac54fb4c
Follow-up to ea0b575dab86a3c44dd1d547dc500276266aa382 #12753
Follow-up to eefcc1bda4bccd800f5a56a0fe17a2f44a96e88b #12730

Closes #12762

21 months agodocs: install curl.1 with cmake as well
Richard Levitte [Mon, 22 Jan 2024 21:49:17 +0000 (22:49 +0100)] 
docs: install curl.1 with cmake as well

Closes #12759

21 months agoosslq: remove the TLS library from the version output
Daniel Stenberg [Tue, 23 Jan 2024 16:45:22 +0000 (17:45 +0100)] 
osslq: remove the TLS library from the version output

Since we only support using a single TLS library at any one time, we
know that the TLS library for QUIC is the same that is also shown for
regular TLS.

Fixes #12763
Reported-by: Viktor Szakats
Closes #12767

21 months agoCI: remove unnecessary OpenSSL 3 option `enable-tls1_3`
Stefan Eissing [Mon, 22 Jan 2024 16:31:25 +0000 (17:31 +0100)] 
CI: remove unnecessary OpenSSL 3 option `enable-tls1_3`

.. and switch OpenSSL 3 libdir from lib64 to lib for consistency.

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

21 months agoGHA: bump nghttp2 version to v1.59.0
Stefan Eissing [Tue, 23 Jan 2024 15:35:08 +0000 (16:35 +0100)] 
GHA: bump nghttp2 version to v1.59.0

- Switch to v1.59.0 for GHA CI jobs that use a specific nghttp2-version.

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

21 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 23 Jan 2024 13:34:36 +0000 (14:34 +0100)] 
RELEASE-NOTES: synced

21 months agodocs/cmdline: change to .md for cmdline docs
Daniel Stenberg [Sat, 20 Jan 2024 22:18:43 +0000 (23:18 +0100)] 
docs/cmdline: change to .md for cmdline docs

 - switch all invidual files documenting command line options into .md,
   as the documentation is now markdown-looking.

 - made the parser treat 4-space indents as quotes

 - switch to building the curl.1 manpage using the "mainpage.idx" file,
   which lists the files to include to generate it, instead of using the
   previous page-footer/headers. Also, those files are now also .md
   ones, using the same format. I gave them underscore prefixes to make
   them sort separately:
   _NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
   _VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
   _OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
   _EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md

 - updated test cases accordingly

Closes #12751

21 months agoCI: bump actions/cache from 3 to 4
dependabot[bot] [Mon, 22 Jan 2024 14:36:50 +0000 (14:36 +0000)] 
CI: bump actions/cache from 3 to 4

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #12756

21 months agoopenssl: when verifystatus fails, remove session id from cache
Daniel Stenberg [Mon, 22 Jan 2024 22:54:08 +0000 (23:54 +0100)] 
openssl: when verifystatus fails, remove session id from cache

To prevent that it gets used in a subsequent transfer that skips the
verifystatus check since that check can't be done when the session id is
reused.

Reported-by: Hiroki Kurosawa
Closes #12760

21 months agocmake: add option to disable building docs
Viktor Szakats [Mon, 22 Jan 2024 22:16:54 +0000 (23:16 +0100)] 
cmake: add option to disable building docs

21 months agocmake: use curldown to build man pages
Richard Levitte [Mon, 22 Jan 2024 06:49:08 +0000 (07:49 +0100)] 
cmake: use curldown to build man pages

This throws away the previous HTML and PDF producers, to mimic what
Makefile.am does as faithfully as possible.

Closes #12753

21 months agomksymbolsmanpage.pl: provide references to where the symbol is used
Daniel Stenberg [Fri, 19 Jan 2024 15:18:40 +0000 (16:18 +0100)] 
mksymbolsmanpage.pl: provide references to where the symbol is used

21 months agodocs: introduce "curldown" for libcurl man page format
Daniel Stenberg [Wed, 17 Jan 2024 10:32:44 +0000 (11:32 +0100)] 
docs: introduce "curldown" for libcurl man page format

curldown is this new file format for libcurl man pages. It is markdown
inspired with differences:

- Each file has a set of leading headers with meta-data
- Supports a small subset of markdown
- Uses .md file extensions for editors/IDE/GitHub to treat them nicely
- Generates man pages very similar to the previous ones
- Generates man pages that still convert nicely to HTML on the website
- Detects and highlights mentions of curl symbols automatically (when
  their man page section is specified)

tools:

- cd2nroff: converts from curldown to nroff man page
- nroff2cd: convert an (old) nroff man page to curldown
- cdall: convert many nroff pages to curldown versions
- cd2cd: verifies and updates a curldown to latest curldown

This setup generates .3 versions of all the curldown versions at build time.

CI:

Since the documentation is now technically markdown in the eyes of many
things, the CI runs many more tests and checks on this documentation,
including proselint, link checkers and tests that make sure we capitalize the
first letter after a period...

Closes #12730

21 months agolibssh2: use `libssh2_session_callback_set2()` with v1.11.1
Viktor Szakats [Mon, 22 Jan 2024 11:21:10 +0000 (11:21 +0000)] 
libssh2: use `libssh2_session_callback_set2()` with v1.11.1

To avoid a local hack to pass function pointers and to avoid
deprecation warnings when building with libssh2 v1.11.1 or newer:
```
lib/vssh/libssh2.c:3324:5: warning: 'libssh2_session_callback_set' is deprecated: since libssh2 1.11.1. Use libssh2_session_callback_set2() [-Wdeprecated-declarations]
lib/vssh/libssh2.c:3326:5: warning: 'libssh2_session_callback_set' is deprecated: since libssh2 1.11.1. Use libssh2_session_callback_set2() [-Wdeprecated-declarations]
```
Ref: https://github.com/curl/curl-for-win/actions/runs/7609484879/job/20720821100#step:3:4982

Ref: https://github.com/libssh2/libssh2/pull/1285
Ref: https://github.com/libssh2/libssh2/commit/c0f69548be902147ce014ffa40b8db3cf1d4b0b4
Reviewed-by: Daniel Stenberg
Closes #12754

21 months agotransfer: make the select_bits_paused condition check both directions
Daniel Stenberg [Mon, 22 Jan 2024 15:22:19 +0000 (16:22 +0100)] 
transfer: make the select_bits_paused condition check both directions

If there is activity in a direction that is not paused, return false.

Reported-by: Sergey Bronnikov
Bug: https://curl.se/mail/lib-2024-01/0049.html
Closes #12740

21 months agohttp3: initial support for OpenSSL 3.2 QUIC stack
Stefan Eissing [Thu, 18 Jan 2024 12:07:07 +0000 (13:07 +0100)] 
http3: initial support for OpenSSL 3.2 QUIC stack

- HTTP/3 for curl using OpenSSL's own QUIC stack together
  with nghttp3
- configure with `--with-openssl-quic` to enable curl to
  build this. This requires the nghttp3 library
- implementation with the following restrictions:
  * macOS has to use an unconnected UDP socket due to an
    issue in OpenSSL's datagram implementation
    See https://github.com/openssl/openssl/issues/23251
    This makes connections to non-reponsive servers hang.
  * GET requests will send the indicator that they have
    no body in a separate QUIC packet. This may result
    in processing delays or Transfer-Encodings on proxied
    requests
  * uploads that encounter blocks will use 100% cpu as
    detection of these flow control issue is not working
    (we have not figured out to pry that from OpenSSL).

Closes #12734

21 months agocmake: fix `ENABLE_MANUAL` option
Viktor Szakats [Sun, 21 Jan 2024 15:38:09 +0000 (15:38 +0000)] 
cmake: fix `ENABLE_MANUAL` option

Fix the `ENABLE_MANUAL` option. Set it to default to `OFF`.

Before this patch `ENABLE_MANUAL=ON` was a no-op, even though it was the
option designed to enable building and using the built-in curl manual.
(`USE_MANUAL=ON` option worked for this instead, by accident).

Ref: https://github.com/curl/curl/pull/12730#issuecomment-1902572409
Closes #12749

21 months agoTODO: update broken link to ratelimit-headers draft
Mohammadreza Hendiani [Fri, 19 Jan 2024 13:59:03 +0000 (17:29 +0330)] 
TODO: update broken link to ratelimit-headers draft

Closes #12741

21 months agocmake: when USE_MANUAL=YES, build the curl.1 man page
Daniel Stenberg [Fri, 19 Jan 2024 14:03:50 +0000 (15:03 +0100)] 
cmake: when USE_MANUAL=YES, build the curl.1 man page

Fixes KNOWN_BUG 15.4

Closes #12742

21 months agocmdline-opts/write-out.d: remove spurious double quotes
Daniel Stenberg [Fri, 19 Jan 2024 15:37:14 +0000 (16:37 +0100)] 
cmdline-opts/write-out.d: remove spurious double quotes

21 months agortsp: Convert assertion into debug log
Stefan Eissing [Fri, 19 Jan 2024 09:15:03 +0000 (10:15 +0100)] 
rtsp: Convert assertion into debug log

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65934

- write excess bytes to the client where the standard excess bytes
  checks will report any wrongness and fail the transfer

Fixes #12738
Closes #12739

21 months agoheaders: remove assert from Curl_headers_push
Daniel Stenberg [Tue, 16 Jan 2024 22:50:02 +0000 (23:50 +0100)] 
headers: remove assert from Curl_headers_push

The fuzzer managed to reach the function without a terminating CR or LF
so let's handle it normally. While there, remove the goto.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65839

Closes #12721

21 months agocurl_easy_getinfo.3: remove the wrong time value count
Daniel Stenberg [Wed, 17 Jan 2024 08:42:54 +0000 (09:42 +0100)] 
curl_easy_getinfo.3: remove the wrong time value count

It said "six" time values but they are eight by now. Remove the mention
of the amount.

Closes #12727