2
0
mirror of https://github.com/curl/curl.git synced 2025-02-17 14:59:45 +08:00
Commit Graph

32025 Commits

Author SHA1 Message Date
Viktor Szakats
3d569aaaf8
cmake: use namespaced custom target names
Rename custom target to namespaced (unique) names to avoid colliding
with 3rd-party projects (e.g. libzip) built together with curl.

Reported-by: hammlee96 on github
Fixes 
Closes 
2024-04-09 21:20:54 +00:00
Viktor Szakats
feb1a3527e
appveyor: re-enable OpenSSL 3, bump to 3.2.1
Ref: b62454a875 
Closes 
2024-04-09 21:16:53 +00:00
Stefan Eissing
a6ef4056e8
CI: upgrade openssl version to 3.3.0 for openssl-quic
Closes 
2024-04-09 17:41:46 +02:00
Daniel Stenberg
6416192a8c
RELEASE-NOTES: synced
Bump to 8.8.0-DEV
2024-04-09 17:18:28 +02:00
Daniel Stenberg
187b23b0a4
curl_multi_waitfds.md: add protocol mention
Follow-up to 02beac6bb6
2024-04-09 16:59:28 +02:00
Dmitry Karpov
02beac6bb6
lib: add curl_multi_waitfds
New function call, similar to curl_multi_fdset()

Closes 
2024-04-09 16:53:40 +02:00
Viktor Szakats
e469ac4494
dist: verify tarball reproducibility in CI
Closes 
2024-04-09 14:31:23 +00:00
Stefan Eissing
28c5ddf13a
tests: stabilitze test_02_23*
- h2-download now always opens the output file on first write callback
  invocation, if it will pause the transfer or not.
- Checks on output files then does not depend on the amount of data curl
  has collected for the first write.

Closes 
2024-04-09 13:27:21 +02:00
Stefan Eissing
e7de80e8ce
tls: fix compile issues on old-linux CI
Follow-up to 3210101088
Closes 
2024-04-09 13:26:19 +02:00
Viktor Szakats
b6a4f9aa1e
dist: add reproducible dir entries to tarballs
In the initial implementation of reproducible tarballs, they were
missing directory entries, while .zip archives had them. It meant
that on extracting the tarball, on-disk directory entries got the
current timestamp.

This patch fixes this by including directory entries in the tarball,
with reproducible timestamps. It also moves sorting inside tar,
to ensure reproducible directory entry timestamps on extract
(without the need of `--delay-directory-restore` option, when
extracting with GNU tar. BSD tar got that right by default.)

GNU tar 1.28 (2014-07-28) introduced `--sort=`.

Ref: https://github.com/curl/curl/pull/13299#discussion_r1555957350
Follow-up to 860cd5fc2d 
Closes 
2024-04-09 08:37:57 +00:00
Stefan Eissing
3210101088
tls: use shared init code for TCP+QUIC
Closes 
2024-04-09 09:08:05 +02:00
Daniel Stenberg
49573bc187
.mailmap: update Gisle's preferred email 2024-04-09 08:50:07 +02:00
Jan Macku
6b24f099fc
doc: pytest --repeat -> --count
Pytest doesn't have a `--repeat` option, but it does have a `--count`
option.

```
--count=COUNT         Number of times to repeat each test
```

Closes 
2024-04-09 08:44:09 +02:00
Daniel Stenberg
b4e8183f52
src/Makefile.am: access curl.txt using a relative path, not abs
... to make it work when mounted using different mount points. Like when
generated/used inside and outside of a docker image.

Closes 
2024-04-09 08:10:20 +02:00
Daniel Stenberg
9eafc11552
build: remove MacOSX-Framework script
I don't think this is much used these days.

Also remove the libcurl.plist file used (only) by this script

Closes 
2024-04-08 22:46:51 +02:00
Daniel Stenberg
fd6c16c345
release-tools.sh: store the timestamp and release tag too
When maketgz invokes this script to generate the docs/RELEASE-TOOLS.md
file that gets bundled in the release, it now also passes on the exact
timestamp and version number so that those details also get mentioned in
the document. They will help users reproduce an identical tarball.

Closes 
2024-04-08 22:43:48 +02:00
Viktor Szakats
41e07d836f
GHA: disable permissions where missing
Reviewed-by: Daniel Stenberg
Closes 
2024-04-08 14:27:09 +00:00
Stefan Eissing
7f26fd17dd
CI: update component versions
- ngtcp2: v1.4.0
- nghttp3: v1.2.0
- nghttp2: v1.61.0
- mod_h2: v2.0.27

Closes 
2024-04-08 16:19:23 +02:00
Jérôme Leclercq
6b86471fe1
CMake: check fseeko after detecting HAVE_FILE_OFFSET_BITS
Closes 
2024-04-08 15:51:35 +02:00
Stefan Eissing
1302aa6b50
http2: emit RST when client write fails
- When the writing of response data fails, reset the stream
  and do not return a callback error to nghttp2. That would
  be a fatal error for the connection and harm other requests.
- add test cases for various abort scenarios

Reported-by: Konstantin Kuzov
Fixes 
Closes 
2024-04-08 15:49:52 +02:00
Kailun Qin
b679efc0bb
mbedtls: call mbedtls_ssl_setup() after RNG callback is set
Since mbedTLS v3.6.0, the RNG check added in ssl_conf_check() will fail
if no RNG is provided when calling mbedtls_ssl_setup().

Therefore, mbedtls_ssl_conf_rng() needs to be called before the SSL
context is passed to mbedtls_ssl_setup().

Ref: b422cab052

Signed-off-by: Kailun Qin <kailun.qin@intel.com>
Closes 
2024-04-08 14:27:12 +02:00
Daniel Stenberg
50def7c881
NTLM_WB: drop support
The feature has not worked for months and has been marked as DEPRECATED
for six+ months.

Closes 
2024-04-08 13:58:58 +02:00
Daniel Stenberg
9e848439d8
curl_trc: fix build error when lacking verbose messages
Follow-up from 0b28ece657
Closes 
2024-04-08 13:57:14 +02:00
Viktor Szakats
5adbf72b79
contrithanks: honor CURLWWW variable
Reviewed-by: Daniel Stenberg
Closes 
2024-04-08 11:56:41 +00:00
Viktor Szakats
fa69b41c77
GHA: add shellcheck job and fix warnings, shell tidy-ups
Reviewed-by: Daniel Stenberg
Closes 
2024-04-08 09:37:24 +00:00
Viktor Szakats
2c4f836f70
dist: do not require Perl in maketgz
Perl remains required for the tarball build process.

Follow-up to 860cd5fc2d 

Reviewed-by: Daniel Stenberg
Closes 
2024-04-08 09:28:32 +00:00
Daniel Stenberg
20434a6aeb
RELEASE-NOTES: synced 2024-04-08 10:33:36 +02:00
Daniel Stenberg
bcc2e90e45
docs/cmdline-opts: invoke managen using a relative path
... no need to use an absolute path, that makes the build unncessarily
fail if invoked using a different mount point. managen now takes options
to find the input files.

Update test1478 to provide the dir arguments to managen

Closes 
2024-04-08 10:27:27 +02:00
Daniel Stenberg
a3b084b913
GHA: add valgrind to a wolfSSL build
Closes 
2024-04-08 09:39:16 +02:00
Viktor Szakats
860cd5fc2d
dist: set -eu, fix shellcheck, make reproducible and smaller tarballs
- set bash `-eu` and fix fallouts.
- fix shellcheck warnings.
- set and use `SOURCE_DATE_EPOCH` for reproducibility.
  Authored-by: Daniel J. H.
  Ref: 
- set `TZ=UTC` and `LC_ALL=C` for reproducibility.
- make file timestamps in tarball/zip reproducible.
- make directory timestamps in zip reproducible.
- make timestamps of tarballs/zip reproducible.
- make file order in tarball/zip reproducible.
- omit extra file metadata from zip for reproducibility.
- use maximum zip compression.
- use POSIX `ustar` tarball format to avoid supply chain vulnerability:
  https://seclists.org/oss-sec/2021/q4/0
- make uid/gid in tarball reproducible.
- omit owner user/group names from tarball for reproducibility and privacy.
- omit current timestamp from .gz header for reproducibility.
- display SHA-256 hashes of produced tarballs/zip.
- fix whitespace.

`.tar.gz` also became smaller in the process: 4,462,311 -> 4,148,249 bytes (8.7.1)

Requires GNU tar, GNU date, `sha256sum`.

Reviewed-by: Daniel Stenberg
Ref: 
Closes 
2024-04-07 22:28:42 +00:00
Gisle Vanem
a42de088a2 tests/http: fix compiler warning
- Init result code variable to fix clang warning that it may be used
  uninitialized.

Fixes https://github.com/curl/curl/issues/13301
Closes https://github.com/curl/curl/pull/13304
2024-04-07 14:21:31 -04:00
Stefan Eissing
9287563e86 vquic: use new curl_int64_t type
- add curl_int64_t signed 64-bit type for lib use

- define CURL_PRId64, CURL_PRIu64 format ids

- use curl_int64_t in vquic

curl_int64_t signed complements the existing curl_uint64_t unsigned.

Note that `curl_int64_t` and `int64_t` are assignable from each other
but not identical. Some platforms with 64 long type defint int64_t as
"long long" (staring at macOS) which messes up things like pointers and
format identifiers.

Closes https://github.com/curl/curl/pull/13293
2024-04-06 19:08:12 -04:00
Jay Satiro
bf567dd9f1 lib: use multi instead of multi_easy for the active multi
- Use data->multi and not data->multi_easy to refer to the active multi.

The easy handle's active multi is always data->multi.

This is a follow up to 757dfdf which changed curl so that an easy handle
used with the easy interface and then multi interface cannot have two
different multi handles associated with it at the same time
(data->multi_easy from the easy interface and data->multi from the multi
interface).

Closes https://github.com/curl/curl/pull/12665
2024-04-05 16:47:36 -04:00
Viktor Szakats
dc178faee9
tidy-up: whitespace [ci skip] 2024-04-05 15:50:07 +00:00
Daniel Stenberg
1ef4798756
makefile: remove the sorting from the vc-ide action
This target generates the MSVC project files. This change removes the
extra sorting and instead makes the script use the order of the files as
listed in the variables - which are mostly sorted anyway.

This is an attempt to make the project file generation more easily
reproducible.

Ref: 
Closes 
2024-04-05 16:18:31 +02:00
Gisle Vanem
59bfc53849
bearssl: fix compiler warnings
"variables may be uninitialized when used"

Fixes 
Closes 
2024-04-05 16:15:27 +02:00
Daniel Stenberg
995b42eb33
DISTROS: Cygwin updates
Brought-by: Brian Inglis
Fixes 
Co-authored-by: Viktor Szakats
Closes 
2024-04-05 16:09:15 +02:00
Stefan Eissing
0b28ece657
lib: add trace support for client reads and writes
- add `CURL_TRC_READ()` and `CURL_TRC_WRITE()`
- use in generic client writers and readers, as well
  as http headers, chunking and websockets

Closes 
2024-04-05 16:08:10 +02:00
MAntoniak
f46385d36d
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 
2024-04-05 16:06:22 +02:00
Viktor Szakats
11d27cf341
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 
2024-04-05 13:05:36 +00:00
Viktor Szakats
f43545e91b
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
  eeb4540116
  1ab7c3cd28

  Follow-up to 3829759bd0 

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

Closes 
2024-04-05 13:05:19 +00:00
Viktor Szakats
20c1b2d75e
lib: use #error instead of invalid syntax in curl_setup_once.h
Reviewed-by: Daniel Stenberg
Closes 
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 
Closes 
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 
Closes 
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 
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 
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 
Closes 
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 
Closes 
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 
2024-04-04 09:31:11 +00:00
Daniel Stenberg
9496d1d678
RELEASE-NOTES: synced 2024-04-04 11:29:34 +02:00