]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agomakefile.m32: add support for custom ARCH [ci skip]
Viktor Szakats [Mon, 4 Jul 2022 10:26:30 +0000 (10:26 +0000)] 
makefile.m32: add support for custom ARCH [ci skip]

When building curl for target platform other than x64 and x86, it is now
possible to pass `ARCH=custom`, that will omit all hardcoded logic for
setting up CFLAGS/LDFLAGS/RCFLAGS for these platforms, and let these be
customized via `CURL_CFLAG_EXTRAS`, `CURL_LDFLAG_EXTRAS`, and a newly
added one for the resource compiler: `CURL_RCFLAG_EXTRAS`.

This makes it possible to use `makefile.m32` to build for ARM64 for
example.

Reviewed-by: Daniel Stenberg
Closes #9092

3 years agocmake: do not force Windows target versions
Viktor Szakats [Mon, 4 Jul 2022 09:40:55 +0000 (09:40 +0000)] 
cmake: do not force Windows target versions

The goal of this patch is to avoid CMake forcing specific Windows
versions and rely on toolchain defaults or manual selection instead.
This gives back control to the user. This also brings CMake closer to
how autotools and `Makefile.m32` behaves in this regard.

- CMake had a setting `ENABLE_INET_PTON` defaulting to `ON`, which did
  nothing else than fixing the Windows build target to Vista. This also
  happened when the toolchain did not have Vista support (e.g. original
  MinGW), breaking such builds.

  In other environments it did not make a user-facing difference,
  because libcurl has its own pton() implementation, so it works well
  with or without Vista's inet_pton().

  This patch drops this setting. inet_pton() is now used whenever
  building for Vista or newer, either when requested manually or by
  default with modern toolchains (e.g. mingw-w64). Older envs will fall
  back to curl's pton().

  Ref: https://github.com/curl/curl/pull/9027#issuecomment-1164157604
  Ref: https://github.com/curl/curl/pull/8997#issuecomment-1164344155

- When the user did no select a Windows target version manually, stop
  explicitly targeting Windows XP, and instead use the toolchain default.

  This may pose an issue with old toolchains defaulting to pre-XP
  targets. In such case you must manually target Windows XP via:
    `-DCURL_TARGET_WINDOWS_VERSION=0x0501`
  or
    `-DCMAKE_C_FLAGS=-D_WIN32_WINNT=0x0501`

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Closes #9046

3 years agowindows: improve random source
Viktor Szakats [Mon, 4 Jul 2022 09:38:24 +0000 (09:38 +0000)] 
windows: improve random source

- Use the Windows API to seed the fallback random generator.

  This ensures to always have a random seed, even when libcurl is built
  with a vtls backend lacking a random generator API, such as rustls
  (experimental), GSKit and certain mbedTLS builds, or, when libcurl is
  built without a TLS backend. We reuse the Windows-specific random
  function from the Schannel backend.

- Implement support for `BCryptGenRandom()` [1] on Windows, as a
  replacement for the deprecated `CryptGenRandom()` [2] function.

  It is used as the secure random generator for Schannel, and also to
  provide entropy for libcurl's fallback random generator. The new
  function is supported on Vista and newer via its `bcrypt.dll`. It is
  used automatically when building for supported versions. It also works
  in UWP apps (the old function did not).

- Clear entropy buffer before calling the Windows random generator.

  This avoids using arbitrary application memory as entropy (with
  `CryptGenRandom()`) and makes sure to return in a predictable state
  when an API call fails.

[1] https://docs.microsoft.com/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom
[2] https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom

Closes #9027

3 years agosetopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR
Daniel Stenberg [Mon, 13 Jun 2022 07:30:45 +0000 (09:30 +0200)] 
setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR

... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTCOOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992

3 years agodigest: simplify a switch() to a simple if
Daniel Stenberg [Mon, 4 Jul 2022 06:27:21 +0000 (08:27 +0200)] 
digest: simplify a switch() to a simple if

3 years agodigest: provide a special bit for "sess" algos
Daniel Stenberg [Mon, 4 Jul 2022 06:27:15 +0000 (08:27 +0200)] 
digest: provide a special bit for "sess" algos

Also shortened the names and moved them to the .c file since they are
private for this source file only. Also made them #defines instead of
enum.

Closes #9079

3 years agoselect: do not return fatal error on EINTR from poll()
Thomas Weißschuh [Sun, 3 Jul 2022 16:20:44 +0000 (18:20 +0200)] 
select: do not return fatal error on EINTR from poll()

The same was done for select() in 5912da25 but poll() was missed.

Bug: https://bugs.archlinux.org/task/75201
Reported-by: Alexandre Bury (gyscos at archlinux)
Ref: https://github.com/curl/curl/issues/8921
Ref: https://github.com/curl/curl/pull/8961
Ref: https://github.com/curl/curl/commit/5912da25#r77584294

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

3 years agocmake: fix build for mingw cross compile
Kai Pastor [Sat, 2 Jul 2022 07:36:09 +0000 (09:36 +0200)] 
cmake: fix build for mingw cross compile

- Change normaliz lib name to all lowercase.

This is from a standing patch in vcpkg:
Mingw has libnormaliz.a. For case-sensitive file systems (e.g. cross
builds from Linux), the spelling must match exactly.

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

3 years agoeasy_lock: fix build for mingw
Jay Satiro [Fri, 1 Jul 2022 07:02:20 +0000 (03:02 -0400)] 
easy_lock: fix build for mingw

- Define SRWLOCK symbols missing in some mingw environments.

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

3 years agotool_progress: avoid division by zero in parallel progress meter
Daniel Stenberg [Fri, 1 Jul 2022 22:02:04 +0000 (00:02 +0200)] 
tool_progress: avoid division by zero in parallel progress meter

Reported-by: Brian Carpenter
Fixes #9082
Closes #9083

3 years agohttp_aws_sigv4.c: remove two unusued includes
Daniel Stenberg [Fri, 1 Jul 2022 14:43:02 +0000 (16:43 +0200)] 
http_aws_sigv4.c: remove two unusued includes

Closes #9080

3 years ago.mailmap: additional edit
Daniel Stenberg [Fri, 1 Jul 2022 07:56:07 +0000 (09:56 +0200)] 
.mailmap: additional edit

Follow-up to 861e2a8aca6c7 so that Evgeny appears with the same in git
logs even when using old email.

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 1 Jul 2022 07:53:08 +0000 (09:53 +0200)] 
RELEASE-NOTES: synced

bumped to 7.84.1

3 years ago.mailmap: updated
Evgeny Grin (Karlson2k) [Thu, 30 Jun 2022 14:31:52 +0000 (17:31 +0300)] 
.mailmap: updated

3 years agoTHANKS: merged two entries for Evgeny Grin
Evgeny Grin (Karlson2k) [Thu, 30 Jun 2022 11:27:23 +0000 (14:27 +0300)] 
THANKS: merged two entries for Evgeny Grin

Also updated THANKS-filter file

Closes #9076

3 years agolib/curl_path.c: add ISC to license expression
Jilayne Lovejoy [Thu, 30 Jun 2022 17:01:49 +0000 (11:01 -0600)] 
lib/curl_path.c: add ISC to license expression

THe text of the ISC license is in this file, so the SPDX license
expression should be updated

Closes #9073

3 years agohyper: use wakers for curl pause/resume
Sean McArthur [Thu, 30 Jun 2022 00:45:32 +0000 (17:45 -0700)] 
hyper: use wakers for curl pause/resume

Closes #9070

3 years agoMakefile.m32: do not set the libcurl.rc debug flag [ci skip]
Viktor Szakats [Thu, 30 Jun 2022 08:14:29 +0000 (08:14 +0000)] 
Makefile.m32: do not set the libcurl.rc debug flag [ci skip]

Delete `-DDEBUGBUILD=0` windres option. This was likely meant to
disable VS_FF_DEBUG in FILEFLAGS, but any assigned value enabled
it instead. Delete this unnecessary option and thus sync up with
how CMake compiles libcurl.rc by default.

Reviewed-by: Jay Satiro
Closes #9069

3 years agocurl.h: CURLE_CONV_FAILED is obsoleted
Daniel Stenberg [Wed, 29 Jun 2022 08:42:04 +0000 (10:42 +0200)] 
curl.h: CURLE_CONV_FAILED is obsoleted

The last use was removed in 7.82.0. Updated some docs too to reflect the
current error code situation.

Closes #9067

3 years agocurl: output warning when a cookie is dropped due to size
Daniel Stenberg [Tue, 28 Jun 2022 15:15:24 +0000 (17:15 +0200)] 
curl: output warning when a cookie is dropped due to size

Dropped from the request, that is.

Closes #9064

3 years agocurl_mime_data.3: polish the wording
Daniel Stenberg [Tue, 28 Jun 2022 11:01:40 +0000 (13:01 +0200)] 
curl_mime_data.3: polish the wording

Closes #9063

3 years agoconfigure: check for the stdatomic.h header in configure
Daniel Stenberg [Tue, 28 Jun 2022 06:37:22 +0000 (08:37 +0200)] 
configure: check for the stdatomic.h header in configure

... and only set HAVE_ATOMIC if that header exists since we use
typedefes set in it.

Reported-by: Ryan Schmidt
Fixes #9059
Closes #9060

3 years agoeasy_lock: fix the #ifdef conditional for ia32_pause
Daniel Stenberg [Tue, 28 Jun 2022 08:21:07 +0000 (10:21 +0200)] 
easy_lock: fix the #ifdef conditional for ia32_pause

To work better with new and old clang compilers.

Reported-by: Ryan Schmidt
Assisted-by: Joshua Root
Fixes #9058
Closes #9062

3 years agoeasy_lock: switch to using atomic_int instead of bool
Daniel Stenberg [Tue, 28 Jun 2022 07:00:25 +0000 (09:00 +0200)] 
easy_lock: switch to using atomic_int instead of bool

To work with more compilers without requiring separate libs to
link. Like with gcc-12 for RISC-V on Linux.

Reported-by: Adam Sampson
Fixes #9055
Closes #9061

3 years agongtcp2: fix incompatible function pointer types
vvb2060 [Mon, 27 Jun 2022 19:50:33 +0000 (03:50 +0800)] 
ngtcp2: fix incompatible function pointer types

Closes #9056

3 years agoeasy_lock.h: use __asm__ instead of asm to fix build
vvb2060 [Mon, 27 Jun 2022 19:48:43 +0000 (03:48 +0800)] 
easy_lock.h: use __asm__ instead of asm to fix build

Closes #9056

3 years agolibcurl-security.3: fix typo on macro "SH_"
Samuel Henrique [Mon, 27 Jun 2022 21:27:06 +0000 (22:27 +0100)] 
libcurl-security.3: fix typo on macro "SH_"

During the packaging of the latest curl release for Debian, Lintian
warned me about a typo which causes the section name "Secrets in memory"
to not be rendered in the manpage due to "SH_" not being recognized as a
header.

Closes #9057

3 years agoeasy_lock.h: include sched.h if available to fix build
Daniel Stenberg [Mon, 27 Jun 2022 06:46:21 +0000 (08:46 +0200)] 
easy_lock.h: include sched.h if available to fix build

Patched-by: Harry Sintonen
Closes #9054

3 years agoRELEASE-NOTES: synced curl-7_84_0
Daniel Stenberg [Mon, 27 Jun 2022 06:07:28 +0000 (08:07 +0200)] 
RELEASE-NOTES: synced

Version 7.84.0 release

3 years agoTHANKS: contributors from 7.84.0 release notes
Daniel Stenberg [Mon, 27 Jun 2022 06:07:28 +0000 (08:07 +0200)] 
THANKS: contributors from 7.84.0 release notes

3 years agohsts: use Curl_fopen()
Daniel Stenberg [Wed, 25 May 2022 08:09:54 +0000 (10:09 +0200)] 
hsts: use Curl_fopen()

3 years agoaltsvc: use Curl_fopen()
Daniel Stenberg [Wed, 25 May 2022 08:09:53 +0000 (10:09 +0200)] 
altsvc: use Curl_fopen()

3 years agofopen: add Curl_fopen() for better overwriting of files
Daniel Stenberg [Wed, 25 May 2022 08:09:53 +0000 (10:09 +0200)] 
fopen: add Curl_fopen() for better overwriting of files

Bug: https://curl.se/docs/CVE-2022-32207.html
CVE-2022-32207
Reported-by: Harry Sintonen
Closes #9050

3 years agotest444: test many received Set-Cookie:
Daniel Stenberg [Sun, 26 Jun 2022 09:01:01 +0000 (11:01 +0200)] 
test444: test many received Set-Cookie:

The amount of sent cookies in the test is limited to 80 because hyper
has its own strict limits in how many headers it allows to be received
which triggers at some point beyond this number.

3 years agotest442/443: test cookie caps
Daniel Stenberg [Sun, 26 Jun 2022 09:01:01 +0000 (11:01 +0200)] 
test442/443: test cookie caps

442 - verify that only 150 cookies are sent
443 - verify that the cookie: header remains less than 8K in size

3 years agocookie: apply limits
Daniel Stenberg [Sun, 26 Jun 2022 09:00:48 +0000 (11:00 +0200)] 
cookie: apply limits

- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50

Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048

3 years agotest387: verify rejection of compression chain attack
Daniel Stenberg [Mon, 16 May 2022 14:29:07 +0000 (16:29 +0200)] 
test387: verify rejection of compression chain attack

3 years agocontent_encoding: return error on too many compression steps
Daniel Stenberg [Mon, 16 May 2022 14:28:13 +0000 (16:28 +0200)] 
content_encoding: return error on too many compression steps

The max allowed steps is arbitrarily set to 5.

Bug: https://curl.se/docs/CVE-2022-32206.html
CVE-2022-32206
Reported-by: Harry Sintonen
Closes #9049

3 years agokrb5: return error properly on decode errors
Daniel Stenberg [Thu, 9 Jun 2022 07:27:24 +0000 (09:27 +0200)] 
krb5: return error properly on decode errors

Bug: https://curl.se/docs/CVE-2022-32208.html
CVE-2022-32208
Reported-by: Harry Sintonen
Closes #9051

3 years agoeasy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro
Daniel Stenberg [Thu, 23 Jun 2022 10:02:32 +0000 (12:02 +0200)] 
easy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro

clang 14 warns about its use. It is being deprecated by the working
group for the programming language C: "The macro ATOMIC_VAR_INIT is
basically useless for the purpose for which it was designed"

Ref: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2886.htm

Reported-by: Tatsuhiro Tsujikawa
Fixes #9041
Closes #9042

3 years agongtcp2: avoid supplying 0 length `msg_control` to sendmsg()
Stefan Eissing [Wed, 22 Jun 2022 13:25:40 +0000 (15:25 +0200)] 
ngtcp2: avoid supplying 0 length `msg_control` to sendmsg()

Testing on macOS 12.4, sendmsg() fails with EINVAL when a msg_control
buffer is provided in sengmsg(), even though msg_controllen was set to
0.

Initialize msg.msg_controllen just as needed and also perform the size
assertion only when needed.

Closes #9039

3 years agoftp: restore protocol state after http proxy CONNECT
Tom Eccles [Thu, 23 Jun 2022 09:09:25 +0000 (10:09 +0100)] 
ftp: restore protocol state after http proxy CONNECT

connect_init() (lib/http_proxy.c) swaps out the protocol state while
working on the proxy connection, this is then restored by
Curl_connect_done() after the connection completes.

ftp_do_more() extracted the protocol state pointer to a local variable
at the start of the function then calls Curl_proxy_connect(). If the proxy
connection completes, Curl_proxy_connect() will call Curl_connect_done()
(via Curl_proxyCONNECT()), which restores data->req.p to point to the ftp
protocol state instead of the http proxy protocol state, but the local
variable in ftp_do_more still pointed to the old value.

Ultimately this meant that the state worked on by ftp_do_more() was the
http proxy state not the ftp state initialised by ftp_connect(), but
subsequent calls to any ftp_ function would use the original state.

For my use-case, the visible consequence was that ftp->downloadsize was
never set and so downloaded data was never returned to the application.

This commit updates the ftp protocol state pointer in ftp_do_more() after
Curl_proxy_connect() returns, ensuring that the correct state pointer is
used.

Fixes #8737
Closes #9043

3 years agoTHANKS: add contributor missing from aea8ac1
Jay Satiro [Thu, 23 Jun 2022 08:06:23 +0000 (04:06 -0400)] 
THANKS: add contributor missing from aea8ac1

aea8ac1 fixed #8980 which was reported by Sgharat on github, but that
info was not included in the commit message.

3 years agocurl_setup: include _mingw.h
Jay Satiro [Wed, 22 Jun 2022 07:35:19 +0000 (03:35 -0400)] 
curl_setup: include _mingw.h

Prior to this change _mingw.h needed to be included in each unit before
evaluating __MINGW{32,64}_xxx_VERSION macros since it defines them. It
is included only in some mingw headers (eg stdio.h) and not others
(eg windows.h) so it's better to explicitly include it once.

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

3 years agorand: stop detecting /dev/urandom in cross-builds
Viktor Szakats [Wed, 22 Jun 2022 09:35:46 +0000 (09:35 +0000)] 
rand: stop detecting /dev/urandom in cross-builds

- Prevent CMake to auto-detect /dev/urandom when cross-building.
  Before this patch, it would detect it in a cross-build scenario on *nix
  hosts with this device present. This was a problem for example with
  Windows builds, but it could affect any target system with this device
  missing. This also syncs detection behaviour with autotools, which also
  skips it for cross-builds.
- Also, make sure to never use the file RANDOM_FILE as entropy for libcurl's
  fallback random number generator on Windows. Windows does not have the
  concept of reading a random stream from a filename, nor any guaranteed
  non-world-writable path on disk. With this, a manual misconfiguration or
  an overeager auto-detection can no longer result in a user-controllable
  seed source.

Reviewed-by: Daniel Stenberg
Closes #9038

3 years agoci: avoid `cmake -Hpath`
Emanuele Torre [Wed, 15 Jun 2022 18:00:42 +0000 (20:00 +0200)] 
ci: avoid `cmake -Hpath`

This is an undocumented option similar to the `-Spath' option introduced
in cmake 3.13.
Replace all instances of `-Hpath' with `-Spath' in macos workflow.
Replace `-H. -Bpath' with `mkdir path; cd ./path; cmake ..' in zuul
scripts since it runs an older version of cmake.

Fixes #9008
Closes #9014

3 years agoINTERNALS: bring back the "Library symbols" section
Daniel Stenberg [Wed, 22 Jun 2022 07:40:39 +0000 (09:40 +0200)] 
INTERNALS: bring back the "Library symbols" section

Most contents was moved, but this text should remain here.

Follow-up to: d324ac8
Reported-by: Viktor Szakats
Bug: https://github.com/curl/curl/pull/9027#discussion_r903382326
Closes #9037

3 years agoMakefile.m32: stop forcing XP target with ipv6 enabled [ci skip]
Viktor Szakats [Wed, 22 Jun 2022 00:06:48 +0000 (00:06 +0000)] 
Makefile.m32: stop forcing XP target with ipv6 enabled [ci skip]

Since this [1] commit in 2011, `_WIN32_WINNT` was set fixed to Windows
XP when the `-ipv6` option is selected. Maybe this was added to support
pre-XP Windows versions (?). These days libcurl builds fine for both XP
and post-XP versions with IPv6 support enabled. The relevance of pre-XP
version is also low by now. Other build methods also do not impose such
limitation for a similar configuration. So, drop this hard-wired
`_WIN32_WINNT` limit from `Makefile.m32`, thus building for the default
Windows version set by the compiler. This is Vista for recent MinGW
versions.

Old behaviour can be restored by setting this envvar:
export CURL_CFLAG_EXTRAS=-D_WIN32_WINNT=0x0501

[1] 98a61d8e2e8982786aaf3916cbbcac96838316e7

Closes #9035

3 years agoCONTRIBUTE: mention how we maintain REUSE compliance
Daniel Stenberg [Tue, 21 Jun 2022 14:56:19 +0000 (16:56 +0200)] 
CONTRIBUTE: mention how we maintain REUSE compliance

for copyright and license information of all files stored in git

Closes #9032

3 years agoCURLOPT_ALTSVC.3: document the file format
Daniel Stenberg [Tue, 21 Jun 2022 17:23:42 +0000 (19:23 +0200)] 
CURLOPT_ALTSVC.3: document the file format

Closes #9033

3 years agoruntests: add "threadsafe" to detected features
Jay Satiro [Tue, 21 Jun 2022 06:17:14 +0000 (02:17 -0400)] 
runtests: add "threadsafe" to detected features

Follow-up to recent commits which added thread-safety support.

Bug: https://github.com/curl/curl/pull/9012#discussion_r902018782
Reported-by: Marc Hörsken
Closes https://github.com/curl/curl/pull/9030

3 years agoeasy: remove dead code
Daniel Stenberg [Mon, 20 Jun 2022 07:00:12 +0000 (09:00 +0200)] 
easy: remove dead code

Follow-up from 5912da253b64d

Detected by Coverity (CID 1506519)

Closes #9029

3 years agotransfer: upload performance; avoid tiny send
Glenn Strauss [Mon, 6 Jun 2022 17:02:30 +0000 (13:02 -0400)] 
transfer: upload performance; avoid tiny send

Append to the upload buffer when only small amount remains in buffer
rather than performing a separate tiny send to empty buffer.

Avoid degenerative upload behavior which might cause curl to send mostly
1-byte DATA frames after exhausing the h2 send window size

Related discussion: https://github.com/nghttp2/nghttp2/issues/1722

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Closes #8965

3 years agoprojects: fix third-party SSL library build paths for Visual Studio
Steve Holme [Thu, 9 Jun 2022 00:18:14 +0000 (17:18 -0700)] 
projects: fix third-party SSL library build paths for Visual Studio

The paths used by the build batch files were inconsistent with those in
the Visual Studio project files.

Closes #8991

3 years agourlapi: make curl_url_set(url, CURLUPART_URL, NULL, 0) clear all parts
Pierrick Charron [Sun, 19 Jun 2022 14:54:04 +0000 (10:54 -0400)] 
urlapi: make curl_url_set(url, CURLUPART_URL, NULL, 0) clear all parts

As per the documentation :

> Setting a part to a NULL pointer will effectively remove that
> part's contents from the CURLU handle.

But currently clearing CURLUPART_URL does nothing and returns
CURLUE_OK. This change will clear all parts of the URL at once.

Closes #9028

3 years agoCI: bump FreeBSD 13.0 to 13.1
Philip H [Thu, 26 May 2022 15:34:02 +0000 (17:34 +0200)] 
CI: bump FreeBSD 13.0 to 13.1

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Closes #8815

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 18 Jun 2022 10:21:48 +0000 (12:21 +0200)] 
RELEASE-NOTES: synced

and updated release date in RELEASE-PROCEDURE.md

3 years agoCURLOPT_HTTPHEADER.3: improve comment in example
divinity76 [Fri, 17 Jun 2022 13:07:36 +0000 (15:07 +0200)] 
CURLOPT_HTTPHEADER.3: improve comment in example

Closes #9025

3 years agoCI/azure: reduce flakiness by retrying install/prepare steps
Marc Hoersken [Tue, 14 Jun 2022 19:33:35 +0000 (21:33 +0200)] 
CI/azure: reduce flakiness by retrying install/prepare steps

Closes #9010

3 years agoCI/cirrus: align Windows timeout with Azure CI at 120 minutes
Marc Hoersken [Tue, 14 Jun 2022 19:14:12 +0000 (21:14 +0200)] 
CI/cirrus: align Windows timeout with Azure CI at 120 minutes

Closes #9009

3 years agovtls: make curl_global_sslset thread-safe
Jay Satiro [Wed, 15 Jun 2022 06:20:49 +0000 (02:20 -0400)] 
vtls: make curl_global_sslset thread-safe

.. and update some docs to explain curl_global_* is now thread-safe.

Follow-up to 23af112 which made curl_global_init/cleanup thread-safe.

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

3 years agocurl_easy_pause.3: remove explanation of progress function
Jay Satiro [Wed, 15 Jun 2022 05:20:27 +0000 (01:20 -0400)] 
curl_easy_pause.3: remove explanation of progress function

- Remove misleading text that says progress function "gets called at
  least once per second, even if the connection is paused."

The progress function behavior is more nuanced and the user is better
served reading the progress function doc rather than attempt to explain
it in the curl_easy_pause doc.

The progress function can only be called at least once per second if an
appropriate multi transfer function is called (eg curl_multi_perform) in
that time. For a paused transfer there may not be such a call. Rather
than explain this in detail in the curl_easy_pause doc, rely on the user
reading the CURLOPT_PROGRESSFUNCTION doc.

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

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

3 years agolibssh: skip the fake-close when libssh does the right thing
Daniel Stenberg [Wed, 15 Jun 2022 21:43:33 +0000 (23:43 +0200)] 
libssh: skip the fake-close when libssh does the right thing

Starting in libssh 0.10.0 ssh_disconnect() will no longer close our
socket. Instead it will be kept alive as we want it, and it is our
responsibility to close it later.

Ref: #8718
Ref: https://gitlab.com/libssh/libssh-mirror/-/merge_requests/240
Closes #9021

3 years agoconfigure: warn about rustls being experimental
Daniel Stenberg [Wed, 15 Jun 2022 21:33:00 +0000 (23:33 +0200)] 
configure: warn about rustls being experimental

Right now a dozen test cases are disabled because they don't work with
rustls.

Closes #9019

3 years agoruntests: skip starting the ssh server if user name is lacking
Daniel Stenberg [Tue, 14 Jun 2022 21:58:26 +0000 (23:58 +0200)] 
runtests: skip starting the ssh server if user name is lacking

Because the ssh server startup script *requires* a user name there's no
point in invoking it if no name was found.

Reported-by: Ricardo M. Correia
Ref: #9007
Closes #9013

3 years agocopyright.pl: parse and use .reuse/dep5 for skips
Daniel Stenberg [Tue, 14 Jun 2022 08:22:57 +0000 (10:22 +0200)] 
copyright.pl: parse and use .reuse/dep5 for skips

Also scan skipped files to be able to find superfluous ignores, shown with -v.

Closes #9006

3 years agoreuse/dep5: adjusted to parse better
Daniel Stenberg [Tue, 14 Jun 2022 08:22:56 +0000 (10:22 +0200)] 
reuse/dep5: adjusted to parse better

... adjusted a few files to contain copyright and license info.

Closes #9006

3 years agobuildconf.bat: update copyright year range
Daniel Stenberg [Tue, 14 Jun 2022 08:22:56 +0000 (10:22 +0200)] 
buildconf.bat: update copyright year range

Closes #9006

3 years agoREADME.md: use the common "Copyright" style formatting
Daniel Stenberg [Tue, 14 Jun 2022 08:22:56 +0000 (10:22 +0200)] 
README.md: use the common "Copyright" style formatting

Closes #9006

3 years agoreuse: move license info from .mailmap.license to .reuse/dep5
Daniel Stenberg [Tue, 14 Jun 2022 08:22:56 +0000 (10:22 +0200)] 
reuse: move license info from .mailmap.license to .reuse/dep5

Closes #9006

3 years agoREADME.md: add a REUSE badge
Daniel Stenberg [Tue, 14 Jun 2022 06:29:31 +0000 (08:29 +0200)] 
README.md: add a REUSE badge

Closes #9004

3 years ago.reuse/dep5: remove recursive docs ignore, only skip markdown files
Daniel Stenberg [Tue, 14 Jun 2022 06:58:20 +0000 (08:58 +0200)] 
.reuse/dep5: remove recursive docs ignore, only skip markdown files

... and some additional non-markdown individual files in docs/

Closes #9005

3 years agodocs/cmdline-opts: add copyright and license identifier to each file
Daniel Stenberg [Mon, 13 Jun 2022 22:12:03 +0000 (00:12 +0200)] 
docs/cmdline-opts: add copyright and license identifier to each file

gen.pl now insists on C: and SPDX-License-Identifier: fields to be
present in all files.

Closes #9002

3 years agocopyright: info for/ignore .github/ISSUE_TEMPLATE/bug_report.md
Daniel Stenberg [Mon, 13 Jun 2022 21:50:45 +0000 (23:50 +0200)] 
copyright: info for/ignore .github/ISSUE_TEMPLATE/bug_report.md

Follow-up from 448f7ef9ab2afb7. The adding of the copyright text in that
file broke site functionality.

Closes #9001

3 years agobug_report.md: revert the REUSE template to see if it works again
Daniel Stenberg [Mon, 13 Jun 2022 21:41:07 +0000 (23:41 +0200)] 
bug_report.md: revert the REUSE template to see if it works again

3 years agoversion: rename threadsafe-init to threadsafe
Viktor Szakats [Mon, 13 Jun 2022 18:59:45 +0000 (18:59 +0000)] 
version: rename threadsafe-init to threadsafe

Referring to Daniel's article [1], making the init function thread-safe
was the last bit to make libcurl thread-safe as a whole. So the name of
the feature may as well be the more concise 'threadsafe', also telling
the story that libcurl is now fully thread-safe, not just its init
function. Chances are high that libcurl wants to remain so in the
future, so there is little likelihood of ever needing any other distinct
`threadsafe-<name>` feature flags.

For consistency we also shorten `CURL_VERSION_THREADSAFE_INIT` to
`CURL_VERSION_THREADSAFE`, update its description and reference libcurl's
thread safety documentation.

[1]: https://daniel.haxx.se/blog/2022/06/08/making-libcurl-init-more-thread-safe/

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #8989

3 years agotest3026: disable on win32
Daniel Stenberg [Mon, 13 Jun 2022 06:04:18 +0000 (08:04 +0200)] 
test3026: disable on win32

... as it's not likely to have working pthreads

Closes #8996

3 years agoGHA: shorten the reuse CI job name
Daniel Stenberg [Mon, 13 Jun 2022 08:03:04 +0000 (10:03 +0200)] 
GHA: shorten the reuse CI job name

"REUSE compliance / check" should be good enough

Closes #9000

3 years agomisc: add missing SPDX-License-Identifier info
Daniel Stenberg [Mon, 13 Jun 2022 07:51:49 +0000 (09:51 +0200)] 
misc: add missing SPDX-License-Identifier info

For some reason the REUSE CI job did not find these.

Closes #8999

3 years agocopyright: verify SPDX-License-Identifier presence as well
Daniel Stenberg [Mon, 13 Jun 2022 07:51:32 +0000 (09:51 +0200)] 
copyright: verify SPDX-License-Identifier presence as well

3 years agoeasy_lock: add SPDX license identifier
Daniel Stenberg [Mon, 13 Jun 2022 07:33:44 +0000 (09:33 +0200)] 
easy_lock: add SPDX license identifier

Closes #8998

3 years agomailmap: Max Mehl
Daniel Stenberg [Mon, 13 Jun 2022 07:12:41 +0000 (09:12 +0200)] 
mailmap: Max Mehl

3 years agogit: ignore large commit making the curl REUSE compliant
max.mehl [Thu, 2 Jun 2022 14:05:04 +0000 (16:05 +0200)] 
git: ignore large commit making the curl REUSE compliant

3 years agocopyright: make repository REUSE compliant
max.mehl [Tue, 17 May 2022 09:16:50 +0000 (11:16 +0200)] 
copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869

3 years agocurl_url_set.3: clarify by default using known schemes only
Daniel Stenberg [Sun, 12 Jun 2022 10:53:54 +0000 (12:53 +0200)] 
curl_url_set.3: clarify by default using known schemes only

Closes #8994

3 years agoscripts/copyright.pl: ignore leading spaces
Daniel Stenberg [Sun, 12 Jun 2022 10:37:03 +0000 (12:37 +0200)] 
scripts/copyright.pl: ignore leading spaces

3 years agongtcp2: fix typo in preprocessor condition
Viktor Szakats [Fri, 10 Jun 2022 23:07:15 +0000 (23:07 +0000)] 
ngtcp2: fix typo in preprocessor condition

Ref: 927ede7edcb7b05b8e8bbf9ced6aed523ae594a7

Bug: https://github.com/curl/curl/pull/8981#discussion_r894312185
Reported-by: Emil Engler
Closes #8987

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 10 Jun 2022 07:18:39 +0000 (09:18 +0200)] 
RELEASE-NOTES: synced

3 years agongtcp2: build without sendmsg
Tatsuhiro Tsujikawa [Fri, 10 Jun 2022 07:09:39 +0000 (09:09 +0200)] 
ngtcp2: build without sendmsg

Closes #8981

3 years agongtcp2: use handshake helper funcs to simplify TLS handshake integration
Tatsuhiro Tsujikawa [Sun, 5 Jun 2022 01:10:51 +0000 (10:10 +0900)] 
ngtcp2: use handshake helper funcs to simplify TLS handshake integration

Closes #8968

3 years agotest390: verify --parallel
Daniel Stenberg [Fri, 10 Jun 2022 07:05:24 +0000 (09:05 +0200)] 
test390: verify --parallel

Closes #8985

3 years agotest1543: verify CURLINFO_EFFECTIVE_URL with CURLOPT_CURLU set
Daniel Stenberg [Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)] 
test1543: verify CURLINFO_EFFECTIVE_URL with CURLOPT_CURLU set

Triggered by a bug report from Adam Light:
https://curl.se/mail/lib-2022-06/0013.html - which ended up being mostly
a misunderstanding of how CURLINFO_EFFECTIVE_URL works.

Closes #8971

3 years agourl: URL encode the path when extracted, if spaces were set
Daniel Stenberg [Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)] 
url: URL encode the path when extracted, if spaces were set

3 years agourlapi: support CURLU_URLENCODE for curl_url_get()
Daniel Stenberg [Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)] 
urlapi: support CURLU_URLENCODE for curl_url_get()

3 years agoserver/sws: support spaces in the HTTP request path
Daniel Stenberg [Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)] 
server/sws: support spaces in the HTTP request path

3 years agotests/getpart: fix getpartattr to work with "data" and "data2"
Daniel Stenberg [Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)] 
tests/getpart: fix getpartattr to work with "data" and "data2"

3 years agoselect: return error from "lethal" poll/select errors
Daniel Stenberg [Wed, 8 Jun 2022 09:03:07 +0000 (11:03 +0200)] 
select: return error from "lethal" poll/select errors

Adds two new error codes: CURLE_UNRECOVERABLE_POLL and
CURLM_UNRECOVERABLE_POLL one each for the easy and the multi interfaces.

Reported-by: Harry Sintonen
Fixes #8921
Closes #8961

3 years agotest3026: add missing control file
Daniel Stenberg [Wed, 8 Jun 2022 08:59:11 +0000 (10:59 +0200)] 
test3026: add missing control file

Follow-up from 2ed101256414ea5

Makes the test run, makes 'make dist' work

This single test takes 24-25 seconds on my machine (with valgrind). For
this reason I tag it with a "slow" keyword.

Closes #8976

3 years agoruntests: fix skipping tests not done event-based
Daniel Stenberg [Wed, 8 Jun 2022 08:24:35 +0000 (10:24 +0200)] 
runtests: fix skipping tests not done event-based

... and call timestampskippedevents() to avoid the flood of
uninitialized variable warnings.

Closes #8977

3 years agotransfer: maintain --path-as-is after redirects
Daniel Stenberg [Tue, 7 Jun 2022 21:28:07 +0000 (23:28 +0200)] 
transfer: maintain --path-as-is after redirects

Reported-by: Marcus T
Fixes #8974
Closes #8975