]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
15 months agourldata: remove fields not used depending on used features
MAntoniak [Mon, 25 Mar 2024 23:19:23 +0000 (00:19 +0100)] 
urldata: remove fields not used depending on used features

Reduced size of dynamically_allocated_data structure.

Reduced number of stored values in enum dupstring and enum dupblob. This
affects the reduced array placed in the UserDefined structure.

Closes #13188

15 months agocmake: enable `-pedantic-errors` for clang when `CURL_WERROR=ON`
Viktor Szakats [Thu, 4 Apr 2024 21:22:37 +0000 (21:22 +0000)] 
cmake: enable `-pedantic-errors` for clang when `CURL_WERROR=ON`

clang doesn't have the issues of GCC and old CMake versions.

Note: This introduces asymmetry with autotools, which only enables
this for GCC.

Reviewed-by: Daniel Stenberg
Closes #13286

15 months agocmake: fix `CURL_WERROR=ON` for old CMake and use it in GHA/linux-old
Viktor Szakats [Thu, 4 Apr 2024 10:45:01 +0000 (10:45 +0000)] 
cmake: fix `CURL_WERROR=ON` for old CMake and use it in GHA/linux-old

- cmake: fix `-pedantic-errors` for old CMake with `CURL_WERROR=ON` set.

  `-pedantic-errors` option throws a warning with GCC (all versions) and
  makes `check_symbol_exists()` fail in CMake versions older than
  v3.23.0 (2022-03-29), when CMake introduced a workaround:

  https://gitlab.kitware.com/cmake/cmake/-/issues/13208
  https://gitlab.kitware.com/cmake/cmake/-/commit/eeb45401163d831b8c841ef6eba81466b4067b68
  https://gitlab.kitware.com/cmake/cmake/-/commit/1ab7c3cd28b27ca162c4559e1026e5cad1898ade

  Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489

- set `CURL_WERROR=ON` for the `linux-old` job in CI.

Closes #13282

15 months agolib: use `#error` instead of invalid syntax in `curl_setup_once.h`
Viktor Szakats [Thu, 4 Apr 2024 20:01:05 +0000 (20:01 +0000)] 
lib: use `#error` instead of invalid syntax in `curl_setup_once.h`

Reviewed-by: Daniel Stenberg
Closes #13287

15 months agoGHA: on macOS remove $HOME/.curlrc
Daniel Stenberg [Thu, 4 Apr 2024 21:38:36 +0000 (23:38 +0200)] 
GHA: on macOS remove $HOME/.curlrc

A recent image upgrade added a $HOME/.curlrc by default using --ipv4.

Ref: https://github.com/actions/runner-images/pull/9586
Fixes #13284
Closes #13285

15 months agocmake: fixup `DEPENDS` filename
Viktor Szakats [Thu, 4 Apr 2024 19:33:49 +0000 (19:33 +0000)] 
cmake: fixup `DEPENDS` filename

Fixing:
```
make[2]: Circular docs/curl-config.1 <- docs/curl-config.1 dependency dropped.
make[2]: Circular docs/mk-ca-bundle.1 <- docs/mk-ca-bundle.1 dependency dropped.
```
Ref: https://github.com/curl/curl/actions/runs/8559617487/job/23456740844?pr=13282#step:6:18

Follow-up to 5023ffad2c27d4b916ddb91800f99ecc5d3aad07 #13197
Closes #13283

15 months agoGHA: enable unity mode for cmake jobs + tidy-ups
Viktor Szakats [Thu, 4 Apr 2024 10:45:01 +0000 (10:45 +0000)] 
GHA: enable unity mode for cmake jobs + tidy-ups

Unity mode is not supported by CMake v3.7.2 used in linux-old, but
enable it anyway for consistency and to kick in automatically once
migrating to a newer old Linux in the future.

Also:
- replace `CMAKE_COMPILE_WARNING_AS_ERROR` with `CURL_WERROR`.
- delete default build option `PICKY_COMPILER=ON`.

Closes #13277

15 months agoCI: Add CI build on Debian stretch to test old support 13029/head
Dan Fandrich [Fri, 1 Mar 2024 23:01:48 +0000 (15:01 -0800)] 
CI: Add CI build on Debian stretch to test old support

This version still has ELTS support and contains some old versions of
key components like cmake to help prevent us from breaking that support.

Closes #13029

15 months agorequest: paused upload on completed download, assess connection
Stefan Eissing [Wed, 3 Apr 2024 11:18:01 +0000 (13:18 +0200)] 
request: paused upload on completed download, assess connection

A transfer with a completed download that is still uploading needs to
check the connection state when it is PAUSEd, since connection
close/errors would otherwise go unnoticed.

Reported-by: Sergey Bronnikov
Fixes #13260
Closes #13271

15 months agourl: do not URL decode proxy crendentials
Daniel Stenberg [Wed, 3 Apr 2024 09:32:55 +0000 (11:32 +0200)] 
url: do not URL decode proxy crendentials

The two options CURLOPT_PROXYUSERNAME and CURLOPT_PROXYPASSWORD set the
actual names as-is, not URL encoded.

Modified test 503 to use percent-encoded strings in the credential
strings that should be passed on as-is.

Reported-by: Sergey Ogryzkov
Fixes #13265
Closes #13270

15 months agoappveyor: enable cmake unity mode by default
Viktor Szakats [Thu, 28 Mar 2024 09:07:35 +0000 (09:07 +0000)] 
appveyor: enable cmake unity mode by default

Leave one non-unity cmake job. This makes the jobs finish slightly
quicker, while giving more coverage for unity issues.

Before:
https://ci.appveyor.com/project/curlorg/curl/builds/49496977
https://ci.appveyor.com/project/curlorg/curl/builds/49500372
After:
https://ci.appveyor.com/project/curlorg/curl/builds/49500338

Also fixup unrelated whitespace.

Reviewed-by: Daniel Stenberg
Closes #13217

15 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 4 Apr 2024 09:29:34 +0000 (11:29 +0200)] 
RELEASE-NOTES: synced

15 months agocmake: speed up libcurl doc building again
Viktor Szakats [Wed, 27 Mar 2024 15:54:08 +0000 (15:54 +0000)] 
cmake: speed up libcurl doc building again

This time limit the number of files per command to avoid exceeding
limitations of certain OS/shell envs.

Such known env is Windows with the `cmd.exe` shell, which features an
8K command-line length limit to this day.

Allowlisting `UNIX` to have no limit and using a limit of 200 for other
envs to be safe. If there is a way to detect `cmd.exe` and/or we know
which precise envs are sensitive to this, we can tweak these conditions
further.

Even with the low limit, this patch reduces external commands by 200x,
making builds much faster.

Ref: #12762 2620aa930bc73af1e4c70b10e3125b957b96ecfb (initial)
Ref: #13047 f03c85635f35269f1f45b983bf216624f541760a (revert)

Reviewed-by: Daniel Stenberg
Closes #13207

15 months agocmake: tidy-up to use `WORKING_DIRECTORY`
Viktor Szakats [Wed, 27 Mar 2024 14:25:47 +0000 (14:25 +0000)] 
cmake: tidy-up to use `WORKING_DIRECTORY`

Reviewed-by: Daniel Stenberg
Closes #13206

15 months agocmake: generate misc manpages and install `mk-ca-bundle.pl`
Viktor Szakats [Wed, 27 Mar 2024 09:56:24 +0000 (09:56 +0000)] 
cmake: generate misc manpages and install `mk-ca-bundle.pl`

- install `mk-ca-bundle.pl` like autotools does.

- generate and install `mk-ca-bundle.1` and `curl-config.1` like
  autotools. This fixes tests 1140 and 1173.

Reported-by: Dan Fandrich
  Fixes #13194

- add option `BUILD_MISC_DOCS` to control building the above two
  manpages. Enabled by default.

- appveyor: stop disabling tests 1140 and 1173.

Reviewed-by: Daniel Stenberg
Closes #13197

15 months agowolfssl: plug memory leak in wolfssl_connect_step2()
Fabian Keil [Sun, 17 Mar 2024 14:49:58 +0000 (15:49 +0100)] 
wolfssl: plug memory leak in wolfssl_connect_step2()

Fixes:

     test 2034...[simple HTTPS GET with DER public key pinning]
     ==61829== 22,610 (3,744 direct, 18,866 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 54
     ==61829==    at 0x484BB74: malloc (vg_replace_malloc.c:446)
     ==61829==    by 0x4B53A80: wolfSSL_Malloc (memory.c:344)
     ==61829==    by 0x4C1C8E1: wolfSSL_X509_new (x509.c:5326)
     ==61829==    by 0x4C3977D: d2i_X509orX509REQ (x509.c:3628)
     ==61829==    by 0x4C1D1F4: wolfSSL_X509_d2i (x509.c:3664)
     ==61829==    by 0x4C1C37B: wolfSSL_X509_dup (x509.c:13425)
     ==61829==    by 0x4C197DB: wolfSSL_get_peer_certificate (ssl.c:18765)
     ==61829==    by 0x33297C: wolfssl_connect_step2 (wolfssl.c:875)
     ==61829==    by 0x331669: wolfssl_connect_common (wolfssl.c:1287)
     ==61829==    by 0x3303E9: wolfssl_connect_nonblocking (wolfssl.c:1319)
     ==61829==    by 0x32FE89: ssl_connect_nonblocking (vtls.c:510)
     ==61829==    by 0x32DBE5: ssl_cf_connect (vtls.c:1679)
     ==61829==    by 0x27ABD7: Curl_conn_cf_connect (cfilters.c:307)
     ==61829==    by 0x27D9CF: cf_setup_connect (connect.c:1199)
     ==61829==    by 0x27ABD7: Curl_conn_cf_connect (cfilters.c:307)
     ==61829==    by 0x283CEA: cf_hc_baller_connect (cf-https-connect.c:135)

Closes #13272

16 months agoappveyor: OpenSSL 3 no longer found by CMake, revert to 1.1.1
Viktor Szakats [Wed, 3 Apr 2024 03:06:16 +0000 (03:06 +0000)] 
appveyor: OpenSSL 3 no longer found by CMake, revert to 1.1.1

OpenSSL moved directories, and bumped versions in AppVeyor CI.

Downgrading is not an ideal solution, but however trivial the solution
may be, I failed to come with anything that made CMake recognize either
OpenSSL 3.1 or 3.2.

Possibly caused by:
https://github.com/appveyor/build-images/commit/702e8cdca01f28f6a40687783f493c786cebbe2c
https://github.com/appveyor/build-images/pull/149

Closes #13266

16 months agowinbuild: use $(RC) correctly
hongfei.li [Wed, 3 Apr 2024 06:24:42 +0000 (14:24 +0800)] 
winbuild: use $(RC) correctly

Cloes #13267

16 months agodist: remove the curl-config.1 from the tarball
Daniel Stenberg [Wed, 3 Apr 2024 08:00:03 +0000 (10:00 +0200)] 
dist: remove the curl-config.1 from the tarball

The markdown file is already there and the .1 file gets generated in the
build.

Ref: #13250
Closes #13268

16 months agocurl_global_trace.md: shorten the description
Daniel Stenberg [Tue, 2 Apr 2024 13:34:12 +0000 (15:34 +0200)] 
curl_global_trace.md: shorten the description

Closes #13263

16 months agotest1901: verify chunked POST from callback with CURLOPT_POSTFIELDSIZE set
Daniel Stenberg [Tue, 2 Apr 2024 13:27:54 +0000 (15:27 +0200)] 
test1901: verify chunked POST from callback with CURLOPT_POSTFIELDSIZE set

Follow-up to 721941aadf4ad

Ref: #13257
Closes #13262

16 months agohttp: with chunked POST forced, disable length check on read callback
Stefan Eissing [Mon, 1 Apr 2024 13:41:18 +0000 (15:41 +0200)] 
http: with chunked POST forced, disable length check on read callback

- when an application forces HTTP/1.1 chunked transfer encoding
  by setting the corresponding header and instructs curl to use
  the CURLOPT_READFUNCTION, disregard any POST length information.
- this establishes backward compatibility with previous curl versions

Applications are encouraged to not force "chunked", but rather
set length information for a POST. By setting -1, curl will
auto-select chunked on HTTP/1.1 and work properly on other HTTP
versions.

Reported-by: Jeff King
Fixes #13229
Closes #13257

16 months agoINSTALL-CMAKE.md: explain `cmake -G <generator-name>`
Jay Satiro [Sun, 31 Mar 2024 06:55:50 +0000 (02:55 -0400)] 
INSTALL-CMAKE.md: explain `cmake -G <generator-name>`

- Explain that CMake's -G option can be used to specify which build
  system to generate files for.

Example: cmake ../curl -G "MinGW Makefiles"

Ref: https://github.com/curl/curl/pull/12224#issuecomment-2026813645

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

16 months agolibcurl-opts: mention pipelining less
Daniel Stenberg [Mon, 1 Apr 2024 07:52:23 +0000 (09:52 +0200)] 
libcurl-opts: mention pipelining less

libcurl has not supported HTTP pipelining since many years. Remove a few
(more) mentions of the feature.

Closes #13254

16 months agom4: reposition USE_RUSTLS="yes" for pkg-config
Daniel McCarney [Sun, 31 Mar 2024 20:19:10 +0000 (16:19 -0400)] 
m4: reposition USE_RUSTLS="yes" for pkg-config

It's necessary to set this var to "yes" _after_ AC_DEFINE and AC_SUBST
in order for a later `test` to pass so that `check_for_ca_bundle=1` ends
up being set. This is in turn required for the default CA certificate
bundle to be set when building w/ rustls & pkg-config.

Reported-by: Matt Jolly
Fixes #13248
Closes #13251

16 months agomaketgz: put docs/RELEASE-TOOL.md into the tarball
Daniel Stenberg [Sat, 30 Mar 2024 20:46:14 +0000 (21:46 +0100)] 
maketgz: put docs/RELEASE-TOOL.md into the tarball

Generated with scripts/release-tools.sh

The script lists the exact Debian package names and version numbers for
the tools that are used to generate the tarball.

Closes #13239

16 months agocd2nroff/manage: use UTC when SOURCE_DATE_EPOCH is set
Daniel Stenberg [Sat, 30 Mar 2024 23:59:55 +0000 (00:59 +0100)] 
cd2nroff/manage: use UTC when SOURCE_DATE_EPOCH is set

Make them independent of the TZ setting. Also set a date string like
YYYY-MM-DD to avoid a local month name in the date.

Reported-by: Carlos Henrique Lima Melara
Fixes #13242
Closes #13243

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 31 Mar 2024 14:35:08 +0000 (16:35 +0200)] 
RELEASE-NOTES: synced

16 months agodocs/MAIL-ETIQUETTE: convert to markdown
Daniel Stenberg [Sun, 31 Mar 2024 10:20:04 +0000 (12:20 +0200)] 
docs/MAIL-ETIQUETTE: convert to markdown

To render nicer. To get spellchecked.

Closes #13247

16 months agoreuse: add copyright + license info to individual docs/*.md files
Daniel Stenberg [Sun, 31 Mar 2024 09:52:28 +0000 (11:52 +0200)] 
reuse: add copyright + license info to individual docs/*.md files

Instead of use 'docs/*.md' in dep5. For clarity and avoiding a wide-
matching wildcard.

+ Remove mention of old files from .reuse/dep5
+ add info to .github/dependabot.yml
+ make scripts/copyright.pl warn on non-matching patterns

Closes #13245

16 months agotest470: warn about unicode quote character read from config file
Daniel Stenberg [Sat, 30 Mar 2024 21:49:01 +0000 (22:49 +0100)] 
test470: warn about unicode quote character read from config file

Idea-by: Emanuele Torre
16 months agotest469: verify warning when argument has unicode quote
Daniel Stenberg [Sat, 30 Mar 2024 21:49:01 +0000 (22:49 +0100)] 
test469: verify warning when argument has unicode quote

16 months agotool_getparam: output warning for leading unicode quote character
Daniel Stenberg [Sat, 30 Mar 2024 21:49:01 +0000 (22:49 +0100)] 
tool_getparam: output warning for leading unicode quote character

... in the option argument.

Typically this is a mistake done when copying example command lines from
online documentation using the wrong quote character.

Presumably there are also other potential quote characters that might be
used, and this check is done without even knowing that unicode is used!

Reported-by: Sanjay Pujare
Fixes #13214
Closes #13215

16 months agotool: follow-up getenv fix
Daniel Stenberg [Sat, 30 Mar 2024 22:42:48 +0000 (23:42 +0100)] 
tool: follow-up getenv fix

Remove a double free. Change the IPFS env use to a plain getenv() simply
because coverity gets confused.

Follow-up to 9126b141c9398fe
Closes #13241

16 months agoidn: make Curl_idnconvert_hostname() use Curl_idn_decode()
Daniel Stenberg [Sat, 30 Mar 2024 21:56:48 +0000 (22:56 +0100)] 
idn: make Curl_idnconvert_hostname() use Curl_idn_decode()

In the name of less code duplication

Closes #13236

16 months agocurl-confopts.m4: define CARES_NO_DEPRECATED when c-ares is used
Daniel Stenberg [Sat, 30 Mar 2024 21:37:08 +0000 (22:37 +0100)] 
curl-confopts.m4: define CARES_NO_DEPRECATED when c-ares is used

Starting in 1.28.0 c-ares added deprecation warnings for some API calls
libcurl uses.

Closes #13240

16 months agovquic: use CURL_FORMAT_CURL_OFF_T for 64 bit printf output
Daniel Stenberg [Sat, 30 Mar 2024 10:15:29 +0000 (11:15 +0100)] 
vquic: use CURL_FORMAT_CURL_OFF_T for 64 bit printf output

Reported-by: Keitagit-kun on github
Fixes #13224
Closes #13231

16 months agoopenldap: create ldap URLs correctly for IPv6 addresses
Daniel Stenberg [Sat, 30 Mar 2024 10:14:54 +0000 (11:14 +0100)] 
openldap: create ldap URLs correctly for IPv6 addresses

Reported-by: Sergio Durigan Junior
Fixes #13228
Closes #13235

16 months agocurl: use curl_getenv instead of the curlx_ version
Daniel Stenberg [Sat, 30 Mar 2024 09:41:21 +0000 (10:41 +0100)] 
curl: use curl_getenv instead of the curlx_ version

The curlx one was once introduced when we still considered dropping the
libcurl function at some point. To reduce confusion and to make it
easier to understand when curl_free() should be used, use the actual
libcurl function call directly instead.

Closes #13230

16 months agocurl_sha512_256: do not use workaround for NetBSD when not needed
Evgeny Grin [Thu, 28 Mar 2024 21:42:55 +0000 (22:42 +0100)] 
curl_sha512_256: do not use workaround for NetBSD when not needed

Assisted-by: riastradh on github
Assisted-by: Michael Kaufmann
Closes #13225

16 months agom4: fix rustls pkg-config codepath
Matt Jolly [Wed, 27 Mar 2024 12:52:26 +0000 (22:52 +1000)] 
m4: fix rustls pkg-config codepath

The previous pkg-config code would successfully detect rustls but did
not set all appropriate variables and call the right macros to properly
configure cURL.

Reported-by: kpcyrd on github
Fixes #13200
Closes #13202

16 months agodeps: update librustls 0.12.0 -> 0.13.0
Daniel McCarney [Sat, 30 Mar 2024 18:18:45 +0000 (14:18 -0400)] 
deps: update librustls 0.12.0 -> 0.13.0

This commit updates the optional rustls-ffi librustls dependency from
0.12.0 to 0.13.0. This version is based on the latest available rustls
release (0.23.4).

The breaking API changes from 0.12.0 to 0.13.0 are in API surface unused
by curl, so this is an in-place update without any code changes.

The `RUSTLS.md` documentation is updated to reflect the new version in
use, and to clarify that `cbindgen` isn't required to build `librustls`
- it's only used by developers to update the vendored `rustls.h` header
file maintained upstream.

Closes #13238

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 28 Mar 2024 15:30:18 +0000 (16:30 +0100)] 
RELEASE-NOTES: synced

16 months agotool_xattr: "guess" URL scheme if none is provided
Daniel Stenberg [Thu, 28 Mar 2024 12:16:04 +0000 (13:16 +0100)] 
tool_xattr: "guess" URL scheme if none is provided

... when figuring out the source URL to store.

Reported-by: Dagfinn Ilmari Mannsåker
Fixes #13205
Closes #13221

16 months agotool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set
Daniel Stenberg [Thu, 28 Mar 2024 12:11:11 +0000 (13:11 +0100)] 
tool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set

Closes #13220

16 months agocontent_encoding: brotli and others, pass through 0-length writes
Stefan Eissing [Thu, 28 Mar 2024 10:08:15 +0000 (11:08 +0100)] 
content_encoding: brotli and others, pass through 0-length writes

- curl's transfer handling may write 0-length chunks at the end of the
  download with an EOS flag. (HTTP/2 does this commonly)

- content encoders need to pass-through such a write and not count this
  as error in case they are finished decoding

Fixes #13209
Fixes #13212
Closes #13219

16 months agolibssh2: set length to 0 if strdup failed
Tobias Stoeckmann [Wed, 27 Mar 2024 23:38:09 +0000 (00:38 +0100)] 
libssh2: set length to 0 if strdup failed

Internally, libssh2 dereferences the NULL pointer if length is non-zero.
The callback function cannot return the error condition, so at least
prevent subsequent crash.

Closes #13213

16 months agoRELEASE-PROCEDURE: mention an initial working build
Daniel Stenberg [Thu, 28 Mar 2024 09:05:09 +0000 (10:05 +0100)] 
RELEASE-PROCEDURE: mention an initial working build

This is the step that was not done and caused the 8.7.0 mishap (it
lacked the correctly generated hugehelp file).

Remove the mention of the copyright script as this is verified by a CI
job these days: the REUSE one.

Closes #13216

16 months agocurl_sha512_255: fix detection of OpenSSL 1.1.1 or later
Paul Howarth [Wed, 27 Mar 2024 18:17:54 +0000 (18:17 +0000)] 
curl_sha512_255: fix detection of OpenSSL 1.1.1 or later

Use the same OPENSSL_VERSION_NUMBER comparison as in lib/vtls/openssl.c.

Closes #13208

16 months agocf-socket: remove references to l_ip, l_port
Robert Moreton [Wed, 27 Mar 2024 19:21:19 +0000 (15:21 -0400)] 
cf-socket: remove references to l_ip, l_port

Fixes #13210
Closes #13211

16 months agoopenssl: do not set SSL_MODE_RELEASE_BUFFERS
Daniel Stenberg [Wed, 27 Mar 2024 13:15:11 +0000 (14:15 +0100)] 
openssl: do not set SSL_MODE_RELEASE_BUFFERS

While it might save some memory, it causes OpenSSL to instead do a huge
amount of allocations.

Ref: #13136
Closes #13203

16 months agocurl: make --help adapt to the terminal width
Daniel Stenberg [Mon, 25 Mar 2024 12:07:48 +0000 (13:07 +0100)] 
curl: make --help adapt to the terminal width

Instead of assuming and working with 80 colums, try figuring out what
width is actually used.

Ref: #13141

Closes #13171

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 27 Mar 2024 11:47:56 +0000 (12:47 +0100)] 
RELEASE-NOTES: synced

and bump to 8.7.2 for now

16 months agoconfigure: make --disable-docs imply --disable-manual
Daniel Stenberg [Tue, 26 Mar 2024 16:14:56 +0000 (17:14 +0100)] 
configure: make --disable-docs imply --disable-manual

Because when the docs is not built, the necesary curl.txt file is not
present so then the manual cannot get built.

Reported-by: Harry Sintonen
Closes #13191

16 months agocmdline-docs: fix make install with configure --disable-docs
Chris Webb [Wed, 27 Mar 2024 10:09:54 +0000 (10:09 +0000)] 
cmdline-docs: fix make install with configure --disable-docs

make -C docs/cmdline-opts install depends on all-am, which in turn
depends on $(MANS), unconditionally defined to be $(man_MANS).

As with CLEANFILES, only add curl.1 to man_MANS when BUILD_DOCS is true
so we don't try to build curl.1 unnecessarily.

Closes #13198

16 months agoRELEASE-PROCEDURE: remove old release dates, add new pending ones curl-8_7_1
Daniel Stenberg [Wed, 27 Mar 2024 07:11:20 +0000 (08:11 +0100)] 
RELEASE-PROCEDURE: remove old release dates, add new pending ones

16 months agoRELEASE-NOTES: synced curl-8_7_0
Daniel Stenberg [Wed, 27 Mar 2024 06:46:15 +0000 (07:46 +0100)] 
RELEASE-NOTES: synced

curl 8.7.0 release

16 months agoTHANKS: new contributors from the 8.7.0 release
Daniel Stenberg [Wed, 27 Mar 2024 06:46:15 +0000 (07:46 +0100)] 
THANKS: new contributors from the 8.7.0 release

16 months agoCURLOPT_POSTFIELDS.md: used for MQTT as well
Daniel Stenberg [Tue, 26 Mar 2024 09:56:08 +0000 (10:56 +0100)] 
CURLOPT_POSTFIELDS.md: used for MQTT as well

Closes #13189

16 months agohttp: remove stale comment about rewindbeforesend
Daniel Stenberg [Mon, 25 Mar 2024 23:32:56 +0000 (00:32 +0100)] 
http: remove stale comment about rewindbeforesend

... because that struct field exists no more.

Follow-up to 14bcea074a782272.

Closes #13187

16 months agoDISTROS: add document with distro pointers
Daniel Stenberg [Sat, 23 Mar 2024 13:43:35 +0000 (14:43 +0100)] 
DISTROS: add document with distro pointers

Lots of organizations distribute curl packages to end users. This is a
collection of pointers to where to learn more about curl on and with
each distro.

Assisted-by: Alan Coopersmith
Assisted-by: Andrew Kaster
Assisted-by: Andy Fiddaman
Assisted-by: Arjan van de Ven
Assisted-by: Brian Clemens
Assisted-by: chrysos349 on github
Assisted-by: Dan Fandrich
Assisted-by: Dan McDonald
Assisted-by: Gaelan Steele
Assisted-by: graywolf on github
Assisted-by: Jan Macku
Assisted-by: John Marshall
Assisted-by: Jonathan Perkin
Assisted-by: Kevin Daudt
Assisted-by: Marcus Müller
Assisted-by: Michał Górny
Assisted-by: Outvi V
Assisted-by: Ross Burton
Assisted-by: Sean Molenaar
Assisted-by: Till Wegmüller
Assisted-by: Viktor Szakats
Assisted-by: Winni Neessen
Closes #13178

16 months agowolfSSL: do not call the stub function wolfSSL_BIO_set_init()
Fabian Keil [Sun, 17 Mar 2024 13:30:33 +0000 (14:30 +0100)] 
wolfSSL: do not call the stub function wolfSSL_BIO_set_init()

Calling the function isn't necessary and causes the build
to fail when wolfSSL has been compiled with NO_WOLFSSL_STUB:

     Making all in opts
       CCLD     curl
     ld: error: undefined symbol: wolfSSL_BIO_set_init
     >>> referenced by wolfssl.c:235 (vtls/wolfssl.c:235)
     >>>               libcurl_la-wolfssl.o:(wolfssl_bio_cf_create) in archive ../lib/.libs/libcurl.a
     cc: error: linker command failed with exit code 1 (use -v to see invocation)
     *** Error code 1

Closes #13164

16 months agocmdline-opts: shorter help texts
Daniel Stenberg [Mon, 25 Mar 2024 09:02:30 +0000 (10:02 +0100)] 
cmdline-opts: shorter help texts

In an effort to increase the readability of the "--help all" output on
narrow (80 column) terminals.

Co-authored-by: Jay Satiro
Closes #13169

16 months agocurl-rustls.m4: add pkg-config support to rustls detection
Matt Jolly [Sun, 24 Mar 2024 09:00:09 +0000 (19:00 +1000)] 
curl-rustls.m4: add pkg-config support to rustls detection

Based on the existing openssl pkg-config detection, this commit tries to
use pkg-config to find `rustls` then falls back to the current approach
if that fails.

We use the following logic:

- if no path is provided, just use pkg-config, if it's not there we have
  a problem!
- if a path is provided, try pkg-config
  + if pkg-config fails, try and find rustls directly

Closes #13179

16 months agoTODO: update 13.11 with more information
Mohammadreza Hendiani [Fri, 22 Mar 2024 14:30:29 +0000 (18:00 +0330)] 
TODO: update 13.11 with more information

Closes #13173

16 months agodocs/libcurl: generate PROTOCOLS from meta-data
Daniel Stenberg [Fri, 22 Mar 2024 22:48:54 +0000 (23:48 +0100)] 
docs/libcurl: generate PROTOCOLS from meta-data

Remove the PROTOCOLS section from the source files completely and
instead generate them based on the header data in the curldown files.

It also generates TLS backend information for options marked for TLS as
protocol.

Closes #13175

16 months agoCURLMOPT_MAX*: mention what happens if changed mid-transfer
Daniel Stenberg [Fri, 22 Mar 2024 23:36:50 +0000 (00:36 +0100)] 
CURLMOPT_MAX*: mention what happens if changed mid-transfer

For CURLMOPT_MAXCONNECTS and CURLMOPT_MAX_HOST_CONNECTIONS

Ref: #13158
Closes #13176

16 months agodocs/libcurl: add TLS backend info for all TLS options
Daniel Stenberg [Thu, 21 Mar 2024 14:46:32 +0000 (15:46 +0100)] 
docs/libcurl: add TLS backend info for all TLS options

All man pages that are listed to be for TLS now must also specify
exactly what TLS backends the option works for, or use All if they all
work.

cd2nroff makes sure this is done and that the listed backends exist.

Closes #13168

16 months agodocs/libcurl: cleanups
Daniel Stenberg [Thu, 21 Mar 2024 14:32:26 +0000 (15:32 +0100)] 
docs/libcurl: cleanups

- CURLINFO_TLS_SESSION.md: remove mention of NSS
- CURLINFO_TLS_SSL_PTR.md: remove NSS leftover
- CURLOPT_CAINFO.md: drop mention of backends not supporting this
- CURLOPT_CAPATH.md: wolfSSL also supports this

Closes #13166

16 months agodocs: make each libcurl man specify protocol(s)
Daniel Stenberg [Thu, 21 Mar 2024 10:50:20 +0000 (11:50 +0100)] 
docs: make each libcurl man specify protocol(s)

The mandatory header now has a mandatory list of protocols for which the
manpage is relevant.

Most man pages already has a "PROTOCOLS" section, but this introduces a
stricter way to specify the relevant protocols.

cd2nroff verifies that at least one protocol is mentioned (which can be
`*`).

This information is not used just yet, but A) the PROTOCOLS section can
now instead get generated and get a unified wording across all manpages
and B) this allows us to more reliably filter/search for protocol
specific manpages/options.

Closes #13166

16 months agohttp2, http3: only return CURLE_PARTIAL_FILE when bytes were received
Stefan Eissing [Tue, 19 Mar 2024 15:06:40 +0000 (16:06 +0100)] 
http2, http3: only return CURLE_PARTIAL_FILE when bytes were received

- should resolve spurious pytest failures when stream were reset
  right after response header were received

Clsoes #13151

16 months agohttp: separate response parsing from response action
Stefan Eissing [Mon, 11 Mar 2024 16:23:15 +0000 (17:23 +0100)] 
http: separate response parsing from response action

- move code that triggers on end-of-response into separate function from
  parsing
- simplify some headp/headerlen usage
- add `httpversion` to SingleRequest to indicate the version of the
  current response

Closes #13134

16 months agohttp2: remove the third (unused) argument from http2_data_done()
Daniel Stenberg [Wed, 20 Mar 2024 11:06:13 +0000 (12:06 +0100)] 
http2: remove the third (unused) argument from http2_data_done()

Closes #13154

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 21 Mar 2024 07:28:56 +0000 (08:28 +0100)] 
RELEASE-NOTES: synced

16 months agoRELEASE-NOTES: corrected
Karlson2k [Wed, 20 Mar 2024 22:03:24 +0000 (23:03 +0100)] 
RELEASE-NOTES: corrected

Corrected link for item 118

Closes #13157

16 months agoCURLOPT_INTERFACE.md: remove spurious amp, add see-also
Daniel Stenberg [Tue, 19 Mar 2024 10:27:42 +0000 (11:27 +0100)] 
CURLOPT_INTERFACE.md: remove spurious amp, add see-also

Closes #13149

16 months agohttp: improve response header handling, save cpu cycles
Stefan Eissing [Mon, 18 Mar 2024 11:46:43 +0000 (12:46 +0100)] 
http: improve response header handling, save cpu cycles

Saving some cpu cycles in http response header processing:
- pass the length of the header line along
- use string constant sizeof() instead of strlen()
- check line length if prefix is possible
- switch on first header char to limit checks

Closes #13143

16 months agotool_getparam: accept a blank -w ""
Daniel Stenberg [Mon, 18 Mar 2024 22:01:22 +0000 (23:01 +0100)] 
tool_getparam: accept a blank -w ""

Added test 468 to verify.

Regression from 07bcae89d5d00 (shipped in 8.6.0)
Reported-by: Thomas Pyle
Fixes #13144
Closes #13145

16 months agocurl_sha512_256: work around a NetBSD bug
Evgeny Grin [Fri, 15 Mar 2024 12:11:53 +0000 (13:11 +0100)] 
curl_sha512_256: work around a NetBSD bug

Based on Michael Kaufmann analysis and suggestion

Closes #13133

16 months agohttp: expect 100 rework
Stefan Eissing [Mon, 11 Mar 2024 16:23:15 +0000 (17:23 +0100)] 
http: expect 100 rework

Move all handling of HTTP's `Expect: 100-continue` feature into a client
reader. Add sending flag `KEEP_SEND_TIMED` that triggers transfer
sending on general events like a timer.

HTTP installs a `CURL_CR_PROTOCOL` reader when announcing `Expect:
100-continue`. That reader works as follows:

- on first invocation, records time, starts the `EXPIRE_100_TIMEOUT`
  timer, disables `KEEP_SEND`, enables `KEEP_SEND_TIMER` and returns 0,
  eos=FALSE like a paused upload.

- on subsequent invocation it checks if the timer has expired. If so, it
  enables `KEEP_SEND` and switches to passing through reads to the
  underlying readers.

Transfer handling's `readwrite()` will be invoked when a timer expires
(like `EXPIRE_100_TIMEOUT`) or when data from the server arrives. Seeing
`KEEP_SEND_TIMER`, it will try to upload more data, which triggers
reading from the client readers again. Which then may lead to a new
pausing or cause the upload to start.

Flags and timestamps connected to this have been moved from
`SingleRequest` into the reader's context.

Closes #13110

16 months agombedtls: fix pytest for newer versions
Stefan Eissing [Fri, 15 Mar 2024 09:10:13 +0000 (10:10 +0100)] 
mbedtls: fix pytest for newer versions

Fix the expectations in pytest for newer versions of mbedtls

Closes #13132

16 months agoipv6.md: mention IPv4 mapped addresses
Daniel Stenberg [Fri, 15 Mar 2024 08:38:21 +0000 (09:38 +0100)] 
ipv6.md: mention IPv4 mapped addresses

Reported-by: Josh Soref
Assisted-by: Jay Satiro
Fixes #13112
Closes #13131

16 months agohttp: revisit http_perhapsrewind()
Stefan Eissing [Wed, 13 Mar 2024 10:42:17 +0000 (11:42 +0100)] 
http: revisit http_perhapsrewind()

- use facilities provided by client readers better
- work also for non-uploading requests like GET/HEAD
- update documentation

Closes #13117

16 months agotest 1541: verify getinfo values on first header callback
Stefan Eissing [Thu, 14 Mar 2024 11:28:46 +0000 (12:28 +0100)] 
test 1541: verify getinfo values on first header callback

Reported-by: chensong1211 on github
Ref: #13125
Closes #13128

16 months agoTLS: start shutdown only when peer did not already close
Stefan Eissing [Fri, 8 Mar 2024 08:37:27 +0000 (09:37 +0100)] 
TLS: start shutdown only when peer did not already close

- When curl sees a TCP close from the peer, do not start a TLS shutdown.
  TLS shutdown is a handshake and if the peer already closed the
  connection, it is not interested in participating.

Reported-by: dfdity on github
Assisted-by: Jiří Bok
Assisted-by: Pēteris Caune
Fixes #10290
Closes #13087

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 14 Mar 2024 22:11:53 +0000 (23:11 +0100)] 
RELEASE-NOTES: synced

16 months agocurl: make --libcurl output better CURLOPT_*SSLVERSION
Daniel Stenberg [Thu, 14 Mar 2024 12:58:45 +0000 (13:58 +0100)] 
curl: make --libcurl output better CURLOPT_*SSLVERSION

The option is really two enums ORed together, so it needs special
attention to make the code output nice.

Added test 1481 to verify. Both the server and the proxy versions.

Reported-by: Boris Verkhovskiy
Fixes #13127
Closes #13129

16 months agoGHA/linux: add sysctl trick to work-around GitHub runner issue
Daniel Stenberg [Thu, 14 Mar 2024 11:56:39 +0000 (12:56 +0100)] 
GHA/linux: add sysctl trick to work-around GitHub runner issue

The GitHub image runner update from 20240304.1.0 to 20240310.1
introduces a problem for clang-14. The issue is caused by
incompatibility between llvm 14 provided in ubuntu-22.04 image and the
much newer kernel configured with high-entropy ASLR.

As a work-around, we issue a sysctl command to lower the entropy and get
clang-14 to work again.

URL: https://github.com/actions/runner-images/issues/9491

Closes #13124

16 months agoSPONSORS: describe the basics
Daniel Stenberg [Wed, 13 Mar 2024 12:26:07 +0000 (13:26 +0100)] 
SPONSORS: describe the basics

Closes #13119

16 months agoGOVERNANCE: document the core team
Daniel Stenberg [Wed, 13 Mar 2024 12:23:38 +0000 (13:23 +0100)] 
GOVERNANCE: document the core team

Closes #13118

16 months agovquic-tls: fix the error code returned for bad CA file
Jay Satiro [Wed, 13 Mar 2024 06:03:18 +0000 (02:03 -0400)] 
vquic-tls: fix the error code returned for bad CA file

- Return CURLE_SSL_CACERT_BADFILE if wolfSSL encounters a problem
  reading the cert file or path.

This is a follow-up to the parent commit aedbbdf1.

Reported-by: Karthikdasari0423@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/13115

16 months agovquic-tls: return appropirate errors on wolfSSL errors
Daniel Stenberg [Mon, 11 Mar 2024 09:53:08 +0000 (10:53 +0100)] 
vquic-tls: return appropirate errors on wolfSSL errors

Reported-by: Dexter Gerig
Closes #13107

16 months agotidy-up: one comment and EOF newlines
Viktor Szakats [Tue, 12 Mar 2024 12:04:27 +0000 (12:04 +0000)] 
tidy-up: one comment and EOF newlines

Reviewed-by: Daniel Stenberg
Closes #13108

16 months agocmdline-opts: language cleanups
Daniel Stenberg [Tue, 12 Mar 2024 09:34:58 +0000 (10:34 +0100)] 
cmdline-opts: language cleanups

Use imperative mood consistently for the first sentence describing an
option.

"Set this" instead "tell curl to set" or "this sets..."

Plus some extra cleanups and rephrasing.

Closes #13106

16 months agomanagen: remove space before protocols
Daniel Stenberg [Tue, 12 Mar 2024 07:45:22 +0000 (08:45 +0100)] 
managen: remove space before protocols

For options that are listed for specific protocols, the protocols (shown
first within parentheses) are now output without the leading space in the
manpage output.

Closes #13105

16 months agombedtls: properly cleanup the thread-shared entropy
Jay Satiro [Thu, 7 Mar 2024 00:18:46 +0000 (19:18 -0500)] 
mbedtls: properly cleanup the thread-shared entropy

- Store the state of the thread-shared entropy for global init/cleanup.

- Use curl's thread support of mbedtls for all Windows builds instead of
  just when the threaded resolver is used via USE_THREADS_WIN32.

Prior to this change on global cleanup curl builds that have curl thread
support for mbedtls freed the entropy (8b1d2298) but failed to mark that
it had been freed, which caused problems on subsequent init + transfer.

Bug: https://github.com/curl/curl/discussions/11919#discussioncomment-8687105
Reported-by: awesomekosm@users.noreply.github.com
Closes https://github.com/curl/curl/pull/13071

16 months agotool_getparam: handle non-existing (out of range) short-options
Daniel Stenberg [Mon, 11 Mar 2024 21:39:22 +0000 (22:39 +0100)] 
tool_getparam: handle non-existing (out of range) short-options

... correctly, even when they follow an existing one without a space in
between.

Verify with test 467

Follow-up to 07dd60c05b
Reported-by: Geeknik Labs
Fixes #13101
Closes #13102

16 months agolib: move 'done' parameter to SingleRequests
Stefan Eissing [Mon, 11 Mar 2024 11:35:07 +0000 (12:35 +0100)] 
lib: move 'done' parameter to SingleRequests

A transfer may do several `SingleRequest`s for its success. This happens
regularly for authentication, follows and retries on failed connections.
The "readwrite()" calls and functions connected to those carried a `bool
*done` parameter to indicate that the current `SingleRequest` is over.
This may happen before `upload_done` or `download_done` bits of
`SingleRequest` are set.

The problem with that is now `write_resp()` protocol handlers are
invoked in places where the `bool *done` cannot be passed up to the
caller. Instead of being a bool in the call chain, it needs to become a
member of `SingleRequest`, reflecting its state.

This removes the `bool *done` parameter and adds the `done` bit to
`SingleRequest` instead. It adds `Curl_req_soft_reset()` for using a
`SingleRequest` in a follow up, clearing `done` and other
flags/counters.

Closes #13096

16 months agorequest: clarify message when request has been sent off
Stefan Eissing [Mon, 11 Mar 2024 08:50:55 +0000 (09:50 +0100)] 
request: clarify message when request has been sent off

Change the "uploaded and fine" message for requests without a body

Reported-by: Karthikdasari0423 on github
Fixes #13093
Closes #13095

16 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 11 Mar 2024 06:30:01 +0000 (07:30 +0100)] 
RELEASE-NOTES: synced