Граф коммитов

31984 Коммитов

Автор SHA1 Сообщение Дата
Viktor Szakats 20c1b2d75e
lib: use `#error` instead of invalid syntax in `curl_setup_once.h`
Reviewed-by: Daniel Stenberg
Closes #13287
2024-04-05 09:24:05 +00:00
Daniel Stenberg 5ae72551d9
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
2024-04-05 08:31:35 +02:00
Viktor Szakats 2cac6a49b3
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 5023ffad2c #13197
Closes #13283
2024-04-04 22:58:51 +00:00
Viktor Szakats b6f2e33118
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
2024-04-04 22:58:50 +00:00
Dan Fandrich 376cd67035 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
2024-04-04 09:23:15 -07:00
Stefan Eissing cfc65fd1ee
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
2024-04-04 11:45:19 +02:00
Daniel Stenberg d5e83eb745
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
2024-04-04 11:35:19 +02:00
Viktor Szakats 29bfde9fea
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
2024-04-04 09:31:11 +00:00
Daniel Stenberg 9496d1d678
RELEASE-NOTES: synced 2024-04-04 11:29:34 +02:00
Viktor Szakats bb84f82476
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 2620aa930b (initial)
Ref: #13047 f03c85635f (revert)

Reviewed-by: Daniel Stenberg
Closes #13207
2024-04-04 09:21:17 +00:00
Viktor Szakats 19f4263f26
cmake: tidy-up to use `WORKING_DIRECTORY`
Reviewed-by: Daniel Stenberg
Closes #13206
2024-04-04 09:21:17 +00:00
Viktor Szakats 5023ffad2c
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
2024-04-04 09:20:04 +00:00
Fabian Keil a15342ddc0
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
2024-04-04 08:56:43 +02:00
Viktor Szakats b62454a875
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:
702e8cdca0
https://github.com/appveyor/build-images/pull/149

Closes #13266
2024-04-03 14:30:55 +00:00
hongfei.li ffa8a385a0
winbuild: use $(RC) correctly
Cloes #13267
2024-04-03 14:45:42 +02:00
Daniel Stenberg 60971d665b
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
2024-04-03 13:16:39 +02:00
Daniel Stenberg df3d5ef25e
curl_global_trace.md: shorten the description
Closes #13263
2024-04-02 23:39:39 +02:00
Daniel Stenberg 308cc482ef
test1901: verify chunked POST from callback with CURLOPT_POSTFIELDSIZE set
Follow-up to 721941aadf

Ref: #13257
Closes #13262
2024-04-02 23:38:35 +02:00
Stefan Eissing 721941aadf
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
2024-04-02 08:41:44 +02:00
Jay Satiro d36c1a7691 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
2024-04-01 18:51:06 -04:00
Daniel Stenberg 6afac4f992
libcurl-opts: mention pipelining less
libcurl has not supported HTTP pipelining since many years. Remove a few
(more) mentions of the feature.

Closes #13254
2024-04-01 14:41:52 +02:00
Daniel McCarney 5a50cb5a18
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
2024-03-31 23:22:17 +02:00
Daniel Stenberg 5418812d34
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
2024-03-31 21:27:13 +02:00
Daniel Stenberg afdd112916
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
2024-03-31 21:25:44 +02:00
Daniel Stenberg e7caf09c04
RELEASE-NOTES: synced 2024-03-31 16:35:08 +02:00
Daniel Stenberg 271896ab33
docs/MAIL-ETIQUETTE: convert to markdown
To render nicer. To get spellchecked.

Closes #13247
2024-03-31 15:32:27 +02:00
Daniel Stenberg 86d33001e4
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
2024-03-31 12:01:18 +02:00
Daniel Stenberg 315373334b
test470: warn about unicode quote character read from config file
Idea-by: Emanuele Torre
2024-03-31 12:00:03 +02:00
Daniel Stenberg 95af421b78
test469: verify warning when argument has unicode quote 2024-03-31 12:00:03 +02:00
Daniel Stenberg 94db8e5c27
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
2024-03-31 11:59:54 +02:00
Daniel Stenberg aba8043075
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 9126b141c9
Closes #13241
2024-03-31 11:04:00 +02:00
Daniel Stenberg 6a43d0d742
idn: make Curl_idnconvert_hostname() use Curl_idn_decode()
In the name of less code duplication

Closes #13236
2024-03-31 11:02:44 +02:00
Daniel Stenberg e54a66aa6c
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
2024-03-31 11:01:28 +02:00
Daniel Stenberg 3208360845
vquic: use CURL_FORMAT_CURL_OFF_T for 64 bit printf output
Reported-by: Keitagit-kun on github
Fixes #13224
Closes #13231
2024-03-31 10:59:55 +02:00
Daniel Stenberg 56935a7dad
openldap: create ldap URLs correctly for IPv6 addresses
Reported-by: Sergio Durigan Junior
Fixes #13228
Closes #13235
2024-03-30 22:50:26 +01:00
Daniel Stenberg 9126b141c9
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
2024-03-30 22:45:47 +01:00
Evgeny Grin 4a98db3786
curl_sha512_256: do not use workaround for NetBSD when not needed
Assisted-by: riastradh on github
Assisted-by: Michael Kaufmann
Closes #13225
2024-03-30 22:44:22 +01:00
Matt Jolly 9c42098370
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
2024-03-30 22:42:05 +01:00
Daniel McCarney 5b1a88e2c0
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
2024-03-30 22:39:42 +01:00
Daniel Stenberg a41cd15bec
RELEASE-NOTES: synced 2024-03-28 16:30:18 +01:00
Daniel Stenberg 5564751f27
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
2024-03-28 16:28:23 +01:00
Daniel Stenberg a15de6f785
tool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set
Closes #13220
2024-03-28 16:26:15 +01:00
Stefan Eissing b30d694a02
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
2024-03-28 16:21:20 +01:00
Tobias Stoeckmann 6f32048200
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
2024-03-28 11:21:44 +01:00
Daniel Stenberg 4ad9d29705
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
2024-03-28 10:17:43 +01:00
Paul Howarth c77bdf17f7
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
2024-03-28 09:19:08 +01:00
Robert Moreton d82869d7a5
cf-socket: remove references to l_ip, l_port
Fixes #13210
Closes #13211
2024-03-28 08:51:19 +01:00
Daniel Stenberg c247827a8a
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
2024-03-28 08:48:51 +01:00
Daniel Stenberg 2efc111ea4
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
2024-03-27 14:12:26 +01:00
Daniel Stenberg 97c417ae28
RELEASE-NOTES: synced
and bump to 8.7.2 for now
2024-03-27 12:47:56 +01:00