]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years agoruntests: document the -j parallel testing option 11255/head
Dan Fandrich [Mon, 5 Jun 2023 20:31:03 +0000 (13:31 -0700)] 
runtests: document the -j parallel testing option

Reported-by: Daniel Stenberg
Ref: #10818
Closes #11255

2 years agoruntests: create multiple test runners when requested
Dan Fandrich [Fri, 19 May 2023 02:35:54 +0000 (19:35 -0700)] 
runtests: create multiple test runners when requested

Parallel testing is enabled by using a nonzero value for the -j option
to runtests.pl. Performant values seem to be about 7*num CPU cores, or
1.3*num CPU cores if Valgrind is in use.

Flaky tests due to improper log locking (bug #11231) are exacerbated
while parallel testing, so it is not enabled by default yet.

Fixes #10818
Closes #11246

2 years agoruntests: handle repeating tests in multiprocess mode
Dan Fandrich [Tue, 23 May 2023 04:47:46 +0000 (21:47 -0700)] 
runtests: handle repeating tests in multiprocess mode

Such as what happens with the --repeat option.  Some functions are
changed to pass the runner ID instead of relying on the non-unique test
number.

Ref: #10818

2 years agoruntests: buffer logmsg while running singletest()
Dan Fandrich [Fri, 19 May 2023 23:43:01 +0000 (16:43 -0700)] 
runtests: buffer logmsg while running singletest()

This allows all messages relating to a single test case to be displayed
together at the end of the test.

Ref: #10818

2 years agoruntests: call initserverconfig() in the runner
Dan Fandrich [Fri, 19 May 2023 04:45:59 +0000 (21:45 -0700)] 
runtests: call initserverconfig() in the runner

This must be done so variables pick up the runner's unique $LOGDIR.

Ref: #10818

2 years agoruntests: use a per-runner random seed
Dan Fandrich [Fri, 19 May 2023 04:40:05 +0000 (21:40 -0700)] 
runtests: use a per-runner random seed

Each runner needs a unique random seed to reduce the chance of port
number collisions. The new scheme uses a consistent per-runner source of
randomness which results in deterministic behaviour, as it did before.

Ref: #10818

2 years agoruntests: complete main test loop refactor for multiple runners
Dan Fandrich [Thu, 18 May 2023 18:20:15 +0000 (11:20 -0700)] 
runtests: complete main test loop refactor for multiple runners

The main test loop is now able to handle multiple runners, or no
additional runner processes at all. At most one process is still
created, however.

Ref: #10818

2 years agoruntests: prepare main test loop for multiple runners
Dan Fandrich [Tue, 16 May 2023 21:25:32 +0000 (14:25 -0700)] 
runtests: prepare main test loop for multiple runners

Some variables are expanded to arrays and hashes so that multiple
runners can be used for running tests.

Ref: #10818

2 years agobufq: make write/pass methods more robust
Stefan Eissing [Sun, 4 Jun 2023 10:43:14 +0000 (12:43 +0200)] 
bufq: make write/pass methods more robust

- related to #11242 where curl enters busy loop when
  sending http2 data to the server

Closes #11247

2 years agotool_getparam: fix comment
Boris Verkhovskiy [Mon, 5 Jun 2023 16:48:37 +0000 (17:48 +0100)] 
tool_getparam: fix comment

Closes #11253

2 years agohaproxy: add --haproxy-clientip flag to spoof client IPs
Raito Bezarius [Thu, 16 Mar 2023 13:20:11 +0000 (14:20 +0100)] 
haproxy: add --haproxy-clientip flag to spoof client IPs

CURLOPT_HAPROXY_CLIENT_IP in the library

Closes #10779

2 years agocurl: add --ca-native and --proxy-ca-native
Daniel Stenberg [Sat, 3 Jun 2023 21:48:37 +0000 (23:48 +0200)] 
curl: add --ca-native and --proxy-ca-native

These are two boolean options to ask curl to use the native OS's CA
store when verifying TLS servers. For peers and for proxies
respectively.

They currently only have an effect for curl on Windows when built to use
OpenSSL for TLS.

Closes #11049

2 years agobuild: drop unused/redundant `HAVE_WINLDAP_H`
Viktor Szakats [Fri, 19 May 2023 14:24:25 +0000 (14:24 +0000)] 
build: drop unused/redundant `HAVE_WINLDAP_H`

Sources did not use it. Autotools used it when checking for the
`winldap` library, which is redundant.

With CMake, detection was broken:
```
Run Build Command(s):/usr/local/Cellar/cmake/3.26.3/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_2d8fe/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_2d8fe.dir/build.make CMakeFiles/cmTC_2d8fe.dir/build
Building C object CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj
/usr/local/opt/llvm/bin/clang --target=x86_64-w64-mingw32 --sysroot=/usr/local/opt/mingw-w64/toolchain-x86_64 -D_WINSOCKAPI_="" -I/my/quictls/x64-ucrt/usr/include -I/my/zlib/x64-ucrt/usr/include -I/my/brotli/x64-ucrt/usr/include -Wno-unused-command-line-argument   -D_UCRT -DCURL_HIDDEN_SYMBOLS -DHAVE_SSL_SET0_WBIO -DHAS_ALPN -DNGHTTP2_STATICLIB -DNGHTTP3_STATICLIB -DNGTCP2_STATICLIB -DUSE_MANUAL=1  -fuse-ld=lld -Wl,-s -static-libgcc  -lucrt  -Wextra -Wall -pedantic -Wbad-function-cast -Wconversion -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-multichar -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wunused -Wwrite-strings -Wcast-align -Wdeclaration-after-statement -Wempty-body -Wendif-labels -Wfloat-equal -Wignored-qualifiers -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Wstrict-prototypes -Wtype-limits -Wvla -Wshift-sign-overflow -Wshorten-64-to-32 -Wdouble-promotion -Wenum-conversion -Wunused-const-variable -Wcomma -Wmissing-variable-declarations -Wassign-enum -Wextra-semi-stmt  -MD -MT CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj -MF CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj.d -o CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj -c /my/curl/bld-cmake-llvm-x64-shared/CMakeFiles/CMakeScratch/TryCompile-3JP6dR/HAVE_WINLDAP_H.c
In file included from /my/curl/bld-cmake-llvm-x64-shared/CMakeFiles/CMakeScratch/TryCompile-3JP6dR/HAVE_WINLDAP_H.c:2:
In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winldap.h:17:
In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/schnlsp.h:9:
In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/schannel.h:10:
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/wincrypt.h:5041:254: error: unknown type name 'PSYSTEMTIME'
  WINIMPM PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate (HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, PCERT_NAME_BLOB pSubjectIssuerBlob, DWORD dwFlags, PCRYPT_KEY_PROV_INFO pKeyProvInfo, PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm, PSYSTEMTIME pStartTime, PSYSTEMTIME pEndTime, PCERT_EXTENSIONS pExtensions);
                                                                                                                                                                                                                                                             ^
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/wincrypt.h:5041:278: error: unknown type name 'PSYSTEMTIME'
  WINIMPM PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate (HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, PCERT_NAME_BLOB pSubjectIssuerBlob, DWORD dwFlags, PCRYPT_KEY_PROV_INFO pKeyProvInfo, PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm, PSYSTEMTIME pStartTime, PSYSTEMTIME pEndTime, PCERT_EXTENSIONS pExtensions);
                                                                                                                                                                                                                                                                                     ^
2 errors generated.
make[1]: *** [CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj] Error 1
make: *** [cmTC_2d8fe/fast] Error 2
exitCode: 2
```

Cherry-picked from #11095 88e4a21ff70ccef391cf99c8165281ff81374503
Reviewed-by: Daniel Stenberg
Closes #11245

2 years agourlapi: scheme starts with alpha
Daniel Stenberg [Mon, 5 Jun 2023 06:28:27 +0000 (08:28 +0200)] 
urlapi: scheme starts with alpha

Add multiple tests to lib1560 to verify

Fixes #11249
Reported-by: ad0p on github
Closes #11250

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 3 Jun 2023 21:52:39 +0000 (23:52 +0200)] 
RELEASE-NOTES: synced

2 years agoCURLOPT_MAIL_RCPT_ALLOWFAILS: replace CURLOPT_MAIL_RCPT_ALLLOWFAILS
Daniel Stenberg [Mon, 29 May 2023 13:25:26 +0000 (15:25 +0200)] 
CURLOPT_MAIL_RCPT_ALLOWFAILS: replace CURLOPT_MAIL_RCPT_ALLLOWFAILS

Deprecate the name using three Ls and prefer the name with two.

Replaces #10047
Closes #11218

2 years agotests/servers: generate temp names in /tmp for unix domain sockets
Daniel Stenberg [Sat, 20 May 2023 15:56:37 +0000 (17:56 +0200)] 
tests/servers: generate temp names in /tmp for unix domain sockets

... instead of putting them in the regular pid directories because
systems generally have strict length requirements for the path name to
be shorter than 107 bytes and we easily hit that boundary otherwise.

The new concept generates two random names: one for the socks daemon and
one for http.

Reported-by: Andy Fiddaman
Fixes #11152
Closes #11166

2 years agohttp2: better support for --limit-rate
Stefan Eissing [Mon, 15 May 2023 14:45:27 +0000 (16:45 +0200)] 
http2: better support for --limit-rate

- leave transfer loop when --limit-rate is in effect and has
  been received
- adjust stream window size to --limit-rate plus some slack
  to make the server observe the pacing we want
- add test case to confirm behaviour

Closes #11115

2 years agocurl_log: evaluate log statement only when transfer is verbose
Stefan Eissing [Fri, 2 Jun 2023 13:57:46 +0000 (15:57 +0200)] 
curl_log: evaluate log statement only when transfer is verbose

Closes #11238

2 years agolibssh2: provide error message when setting host key type fails
Daniel Stenberg [Fri, 2 Jun 2023 16:08:23 +0000 (18:08 +0200)] 
libssh2: provide error message when setting host key type fails

Ref: https://curl.se/mail/archive-2023-06/0001.html

Closes #11240

2 years agosystem.h: remove __IBMC__/__IBMCPP__ guards and apply to all z/OS compiles
Igor Todorovski [Fri, 2 Jun 2023 17:26:22 +0000 (13:26 -0400)] 
system.h: remove __IBMC__/__IBMCPP__ guards and apply to all z/OS compiles

Closes #11241

2 years agodocs/SECURITY-PROCESS.md: link to example of previous critical flaw
Daniel Stenberg [Fri, 2 Jun 2023 16:05:22 +0000 (18:05 +0200)] 
docs/SECURITY-PROCESS.md: link to example of previous critical flaw

2 years agoREADME.md: updated link to opencollective
Mark Seuffert [Wed, 31 May 2023 20:20:18 +0000 (20:20 +0000)] 
README.md: updated link to opencollective

Closes #11232

2 years agolibssh2: use custom memory functions
Daniel Stenberg [Thu, 1 Jun 2023 09:25:38 +0000 (11:25 +0200)] 
libssh2: use custom memory functions

Because of how libssh2_userauth_keyboard_interactive_ex() works: the
libcurl callback allocates memory that is later free()d by libssh2, we
must set the custom memory functions.

Reverts 8b5f100db388ee60118c08aa28

Ref: https://github.com/libssh2/libssh2/issues/1078
Closes #11235

2 years agotest447: test PUTting a file that grows
Daniel Stenberg [Tue, 30 May 2023 12:45:47 +0000 (14:45 +0200)] 
test447: test PUTting a file that grows

... and have curl trim the end when it reaches the expected total amount
of bytes instead of over-sending.

Reported-by: JustAnotherArchivist on github
Closes #11223

2 years agocurl: count uploaded data to stop at the originally given size
Daniel Stenberg [Tue, 30 May 2023 11:59:17 +0000 (13:59 +0200)] 
curl: count uploaded data to stop at the originally given size

Closes #11223
Fixes #11222
Reported-by: JustAnotherArchivist on github
2 years agotool: remove exclamation marks from error/warning messages
Daniel Stenberg [Wed, 31 May 2023 11:47:01 +0000 (13:47 +0200)] 
tool: remove exclamation marks from error/warning messages

2 years agotool: use errorf() for error output
Daniel Stenberg [Wed, 31 May 2023 07:34:02 +0000 (09:34 +0200)] 
tool: use errorf() for error output

Convert a number of fprintf() calls.

2 years agotool: remove newlines from all helpf/notef/warnf/errorf calls
Daniel Stenberg [Tue, 30 May 2023 12:44:56 +0000 (14:44 +0200)] 
tool: remove newlines from all helpf/notef/warnf/errorf calls

Make voutf() always add one.

Closes #11226

2 years agotests/servers.pm: pick unused port number with a server socket
Daniel Stenberg [Mon, 29 May 2023 18:25:09 +0000 (20:25 +0200)] 
tests/servers.pm: pick unused port number with a server socket

This change replaces the previous method of picking a port number at
random to try to start servers on, then retrying up to ten times with
new random numbers each time, with a function that creates a server
socket on port zero, thereby getting a suitable random port set by the
kernel. That server socket is then closed and that port number is used
to setup the actual test server on.

There is a risk that *another* server can be started on the machine in
the time gap, but the server verification feature will detect that.

Closes #11220

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 31 May 2023 06:59:48 +0000 (08:59 +0200)] 
RELEASE-NOTES: synced

bump to 8.2.0

2 years agoconfigure: fix run-compiler for old /bin/sh
Alejandro R. Sedeño [Tue, 30 May 2023 21:56:58 +0000 (17:56 -0400)] 
configure: fix run-compiler for old /bin/sh

If you try to assign and export on the same line on some older /bin/sh
implementations, it complains:

```
$ export "NAME=value"
NAME=value: is not an identifier
```

This commit rewrites run-compiler's assignments and exports to work with
old /bin/sh, splitting assignment and export into two separate
statements, and only quote the value. So now we have:

```
NAME="value"
export NAME
```

While we're here, make the same change to the two supporting
assign+export lines preceeding the script to be consistent with how
exports work throughout the rest of configure.ac.

Closes #11228

2 years agocircleci: install impacket & wolfssl 5.6.0
Philip H [Sun, 16 Apr 2023 19:42:38 +0000 (21:42 +0200)] 
circleci: install impacket & wolfssl 5.6.0

Closes #11221

2 years agotool_urlglob: use curl_off_t instead of longs
Daniel Stenberg [Tue, 30 May 2023 12:06:15 +0000 (14:06 +0200)] 
tool_urlglob: use curl_off_t instead of longs

To handle more globs better (especially on Windows)

Closes #11224

2 years agoscripts: Fix GHA matrix job detection in cijobs.pl
Dan Fandrich [Mon, 1 May 2023 18:57:54 +0000 (11:57 -0700)] 
scripts: Fix GHA matrix job detection in cijobs.pl

The parsing is pretty brittle and it broke detecting some jobs at some
point. Also, detect if Windows is used in GHA.

2 years agoruntests: abort test run after failure without -a 11227/head
Dan Fandrich [Tue, 30 May 2023 20:42:46 +0000 (13:42 -0700)] 
runtests: abort test run after failure without -a

This was broken in a recent refactor and test runs would not stop.

Follow-up to d4a1b5b6

Reported-by: Daniel Stenberg
Fixes #11225
Closes #11227

2 years agoRELEASE-NOTES: synced curl-8_1_2
Daniel Stenberg [Tue, 30 May 2023 06:11:47 +0000 (08:11 +0200)] 
RELEASE-NOTES: synced

8.1.2 release

2 years agoTHANKS: contributors from 8.1.2
Daniel Stenberg [Tue, 30 May 2023 06:13:06 +0000 (08:13 +0200)] 
THANKS: contributors from 8.1.2

2 years agolib1560: verify more scheme guessing
Daniel Stenberg [Mon, 29 May 2023 15:27:22 +0000 (17:27 +0200)] 
lib1560: verify more scheme guessing

- on 2nd level domains
- on names without dots

As mentioned in #11161, "imap.com" will be guessed IMAP

Closes #11219

2 years agopage-header: minor wording polish in the URL segment
Daniel Stenberg [Mon, 29 May 2023 09:44:55 +0000 (11:44 +0200)] 
page-header: minor wording polish in the URL segment

Closes #11217

2 years agopage-header: mention curl version and how to figure out current release
Daniel Stenberg [Mon, 29 May 2023 09:24:57 +0000 (11:24 +0200)] 
page-header: mention curl version and how to figure out current release

Closes #11216

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 28 May 2023 08:29:15 +0000 (10:29 +0200)] 
RELEASE-NOTES: synced

2 years agoconfigure: without pkg-config and no custom path, use -lnghttp2
Daniel Stenberg [Fri, 26 May 2023 08:03:51 +0000 (10:03 +0200)] 
configure: without pkg-config and no custom path, use -lnghttp2

Reported-by: correctmost on github
Fixes #11186
Closes #11210

2 years agocurl: cache the --trace-time value for a second
Stefan Eissing [Fri, 26 May 2023 09:29:25 +0000 (11:29 +0200)] 
curl: cache the --trace-time value for a second

- caches HH:MM:SS computed and reuses it for logging during
  the same second.
- common function for plain log line start formatting

Closes #11211

2 years agolibcurl.m4: remove trailing 'dnl' that causes this to break autoconf
Kev Jackson [Fri, 26 May 2023 13:37:52 +0000 (14:37 +0100)] 
libcurl.m4: remove trailing 'dnl' that causes this to break autoconf

Closes #11212

2 years agohttp3: send EOF indicator early as possible
Stefan Eissing [Thu, 25 May 2023 13:22:12 +0000 (15:22 +0200)] 
http3: send EOF indicator early as possible

- ngtcp2 and quiche implementations relied on the DONE_SEND event
  to forward the EOF for uploads to the libraries. This often
  result in a last 0 length EOF data. Tracking the amount of
  data left to upload allows EOF indication earlier.
- refs #11205 where CloudFlare DoH servers did not like to
  receive the initial upload DATA without EOF and returned
  a 400 Bad Request

Reported-by: Sergey Fionov
Fixes #11205
Closes #11207

2 years agoscripts/contri*sh: no longer grep -v ' '
Daniel Stenberg [Thu, 25 May 2023 12:59:21 +0000 (14:59 +0200)] 
scripts/contri*sh: no longer grep -v ' '

Originally these scripts filtered out names that have no space so that
they better avoid nick names not intended for credits. Such names are
not too commonly used, plus we now give credit even to those.

Additionally: non-latin names, like Asian, don't have spaces at all so
they were also filtered out and had to be manually added which made it
an error-prone operation where Asian names eventually easily fell off by
mistake.

Closes #11206

2 years agocf-socket: restore Curl_sock_assign_addr()
Daniel Stenberg [Thu, 25 May 2023 09:03:56 +0000 (11:03 +0200)] 
cf-socket: restore Curl_sock_assign_addr()

Regression since it was not private. Also used by msh3.c

Follow-up to 8e85764b7bd7f05f5
Reported-by: Gisle Vanem
Fixes #11202
Closes #11204

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 25 May 2023 11:36:49 +0000 (13:36 +0200)] 
RELEASE-NOTES: synced

Taken down to 8.1.2 now for pending patch release

2 years agolibssh: when keyboard-interactive auth fails, try password
Daniel Stenberg [Wed, 24 May 2023 14:34:11 +0000 (16:34 +0200)] 
libssh: when keyboard-interactive auth fails, try password

The state machine had a mistake in that it would not carry on to that
next step.

This also adds a verbose output what methods that are available from the
server and renames the macros that change to the next auth methods to
try.

Reported-by: 左潇峰
Fixes #11196
Closes #11197

2 years agoconfigure: fix build with arbitrary CC and LD_LIBRARY_PATH
Emanuele Torre [Tue, 23 May 2023 09:59:59 +0000 (11:59 +0200)] 
configure: fix build with arbitrary CC and LD_LIBRARY_PATH

Since ./configure and processes that inherit its environment variables
are the only callers of the run-compiler script, we can just save the
current value of the LD_LIBRARY_PATH and CC variables to another pair of
environment variables, and make run-compiler a static script that
simply restores CC and LD_LIBRARY_PATH to the saved value, and before
running the compiler.

This avoids having to inject the values of the variables in the script,
possibly causing problems if they contains spaces, quotes, and other
special characters.

Also add exports in the script just in case LD_LIBRARY_PATH and CC are
not already in the environment.

follow-up from 471dab2

Closes #11182

2 years agourlapi: remove superfluous host name check
Daniel Stenberg [Wed, 24 May 2023 11:50:25 +0000 (13:50 +0200)] 
urlapi: remove superfluous host name check

... as it is checked later more proper.

Closes #11195

2 years agohttp2: fix EOF handling on uploads with auth negotiation
Stefan Eissing [Wed, 24 May 2023 16:48:16 +0000 (18:48 +0200)] 
http2: fix EOF handling on uploads with auth negotiation

- doing a POST with `--digest` does an override on the initial request
  with `Content-Length: 0`, but the http2 filter was unaware of that
  and expected the originally request body. It did therefore not
  send a final DATA frame with EOF flag to the server.
- The fix overrides any initial notion of post size when the `done_send`
  event is triggered by the transfer loop, leading to the EOF that
  is necessary.
- refs #11194. The fault did not happen in testing, as Apache httpd
  never tries to read the request body of the initial request,
  sends the 401 reply and closes the stream. The server used in the
  reported issue however tried to read the EOF and timed out on the
  request.

Reported-by: Aleksander Mazur
Fixes #11194
Cloes #11200

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 23 May 2023 09:12:50 +0000 (11:12 +0200)] 
RELEASE-NOTES: synced

bump to 8.2.0

2 years agolib: remove unused functions, make single-use static
Daniel Stenberg [Mon, 22 May 2023 07:00:16 +0000 (09:00 +0200)] 
lib: remove unused functions, make single-use static

Closes #11174

2 years agoscripts/singleuse.pl: add more API calls
Daniel Stenberg [Mon, 22 May 2023 07:00:07 +0000 (09:00 +0200)] 
scripts/singleuse.pl: add more API calls

2 years agoconfigure: quote the assignments for run-compiler
Christian Hesse [Tue, 23 May 2023 07:40:18 +0000 (09:40 +0200)] 
configure: quote the assignments for run-compiler

Building for multilib failed, as the compiler command contains an
extra argument. That needs quoting.

Regression from b78ca50cb3dda361f9c1

Fixes #11179
Closes #11180

2 years agomisc: fix spelling mistakes
Daniel Stenberg [Sun, 21 May 2023 21:27:43 +0000 (23:27 +0200)] 
misc: fix spelling mistakes

Reported-by: musvaage on github
Fixes #11171
Closes #11172

2 years agoRELEASE-NOTES: synced curl-8_1_1
Daniel Stenberg [Tue, 23 May 2023 06:10:56 +0000 (08:10 +0200)] 
RELEASE-NOTES: synced

curl 8.1.1

2 years agoTHANKS: contributors from the 8.1.1 release
Daniel Stenberg [Tue, 23 May 2023 06:10:56 +0000 (08:10 +0200)] 
THANKS: contributors from the 8.1.1 release

2 years agodocs: fix fuzzing documentation link
Dan Fandrich [Mon, 22 May 2023 22:37:28 +0000 (15:37 -0700)] 
docs: fix fuzzing documentation link

Follow-up to 4c712a1b

2 years agoCI: add an Alpine build with MUSL
Dan Fandrich [Mon, 22 May 2023 20:09:54 +0000 (13:09 -0700)] 
CI: add an Alpine build with MUSL

MUSL is another libc implementation which has its own unique issues
worth testing.

Ref: #11140
Closes #11178

2 years agoruntests: add a missing \n at the end of a log message
Dan Fandrich [Mon, 22 May 2023 21:23:52 +0000 (14:23 -0700)] 
runtests: add a missing \n at the end of a log message

2 years agoSECURITY-PROCESS.md: link security advisory doc and fix typo
correctmost on github [Mon, 22 May 2023 19:22:53 +0000 (15:22 -0400)] 
SECURITY-PROCESS.md: link security advisory doc and fix typo

Closes #11177

2 years agoTODO: build curl with Windows Unicode support
Daniel Stenberg [Mon, 22 May 2023 15:08:45 +0000 (17:08 +0200)] 
TODO: build curl with Windows Unicode support

Closes #7229

2 years agoKNOWN_BUGS: hyper memory-leaks
Daniel Stenberg [Mon, 22 May 2023 15:06:54 +0000 (17:06 +0200)] 
KNOWN_BUGS: hyper memory-leaks

Closes #10803

2 years agohttp/2: unstick uploads
Stefan Eissing [Mon, 22 May 2023 11:20:51 +0000 (13:20 +0200)] 
http/2: unstick uploads

- refs #11157 and #11175 where uploads get stuck or lead to RST streams
- fixes our h2 send behaviour to continue sending in the nghttp2 session
  as long as it wants to. This will empty our send buffer as long as
  the remote stream/connection window allows.
- in case the window is exhausted, the data remaining in the send buffer
  will wait for a WINDOW_UPDATE from the server. Which is a socket event
  that engages our transfer loop again
- the problem in the issue was that we did not exhaust the window, but
  left data in the sendbuffer and no further socket events did happen.
  The server was just waiting for us to send more.
- relatedly, there was an issue fixed that closing a stream with KEEP_HOLD
  set kept the transfer from shutting down - as it should have - leading
  to a timeout.

Closes #11176

2 years agoworkflows/macos: add a job using gcc + debug + secure transport
Daniel Stenberg [Fri, 19 May 2023 21:43:55 +0000 (23:43 +0200)] 
workflows/macos: add a job using gcc + debug + secure transport

2 years agolib: fix conversion warnings with gcc on macOS
Jay Satiro [Sat, 20 May 2023 03:44:07 +0000 (23:44 -0400)] 
lib: fix conversion warnings with gcc on macOS

2 years agosectransp.c: make the code c89 compatible
Daniel Stenberg [Fri, 19 May 2023 20:35:05 +0000 (22:35 +0200)] 
sectransp.c: make the code c89 compatible

Follow-up to dd2bb485521c2ec713001b3a

Reported-by: FeignClaims on github
Fixes #11155
Closes #11159

2 years agoRevert "urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects"
Emanuele Torre [Sun, 21 May 2023 03:01:35 +0000 (05:01 +0200)] 
Revert "urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects"

This reverts commit df6c2f7b544f1f35f2a3e0be11f345affeb6fe9c.
(It only keep the test case that checks redirection to an absolute URL
without hostname and CURLU_NO_AUTHORITY).

I originally wanted to make CURLU_ALLOW_SPACE accept spaces in the
hostname only because I thought
curl_url_set(CURLUPART_URL, CURLU_ALLOW_SPACE) was already accepting
them, and they were only not being accepted in the hostname when
curl_url_set(CURLUPART_URL) was used for a redirection.

That is not actually the case, urlapi never accepted hostnames with
spaces, and a hostname with a space in it never makes sense.
I probably misread the output of my original test when I they were
normally accepted when using CURLU_ALLOW_SPACE, and not redirecting.

Some other URL parsers seems to allow space in the host part of the URL,
e.g. both python3's urllib.parse module, and Chromium's javascript URL
object allow spaces (chromium percent escapes the spaces with %20),
(they also both ignore TABs, and other whitespace characters), but those
URLs with spaces in the hostname are useless, neither python3's requests
module nor Chromium's window.location can actually use them.

There is no reason to add support for URLs with spaces in the host,
since it was not a inconsistency bug; let's revert that patch before it
makes it into release. Sorry about that.

I also reverted the extra check for CURLU_NO_AUTHORITY since that does
not seem to be necessary, CURLU_NO_AUTHORITY already worked for
redirects.

Closes #11169

2 years agoruntests: use the correct fd after select
Dan Fandrich [Fri, 19 May 2023 04:11:57 +0000 (21:11 -0700)] 
runtests: use the correct fd after select

The code was using the wrong fd when determining which runner was ready
with a response.

Ref: #10818
Closes #11160

2 years agotest425: fix the log directory for the upload
Dan Fandrich [Fri, 19 May 2023 05:00:41 +0000 (22:00 -0700)] 
test425: fix the log directory for the upload

This must be %LOGDIR to let it work with parallel tests.

Ref: #10969

2 years agoruntests: handle interrupted reads from IPC pipes
Dan Fandrich [Wed, 17 May 2023 05:34:40 +0000 (22:34 -0700)] 
runtests: handle interrupted reads from IPC pipes

These can be interrupted by signals, especially SIGINT to shut down, and
must be restarted so the IPC call arrives correctly. If the read just
returns an error instead, the IPC calling state will go out of sync and
a proper shutdown won't happen.

Ref: #10818

2 years agohttp2: upload improvements
Stefan Eissing [Sat, 20 May 2023 10:26:04 +0000 (12:26 +0200)] 
http2: upload improvements

Make send buffer smaller to have progress and "upload done" reporting
closer to reality. Fix handling of send "drain" condition to no longer
trigger once the transfer loop reports it is done sending. Also do not
trigger the send "drain" on RST streams.

Background:
- a upload stall was reported in #11157 that timed out
- test_07_33a reproduces a problem with such a stall if the
  server 404s the request and RSTs the stream.
- test_07_33b verifies a successful PUT, using the parameters
  from #11157 and checks success

Ref: #11157
Closes #11165

2 years agohttp2: increase stream window size to 10 MB
Stefan Eissing [Sat, 20 May 2023 16:11:12 +0000 (18:11 +0200)] 
http2: increase stream window size to 10 MB

Reported-by: pandada8 on github
Fixes #11162
Closes #11167

2 years agolib: rename struct 'http_req' to 'httpreq'
Daniel Stenberg [Sat, 20 May 2023 09:55:20 +0000 (11:55 +0200)] 
lib: rename struct 'http_req' to 'httpreq'

Because FreeBSD 14 kidnapped the name.
Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271526

Fixes #11163
Closes #11164

2 years agocmake: avoid `list(PREPEND)` for compatibility
Viktor Szakats [Thu, 18 May 2023 21:02:17 +0000 (21:02 +0000)] 
cmake: avoid `list(PREPEND)` for compatibility

`list(PREPEND)` requires CMake v3.15, our minimum is v3.7.

Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend

Regression from 1e3319a167d2f32d295603167486e9e88af9bb4e

Reported-by: Keitagit-kun on Github
Fixes #11141
Closes #11144

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 19 May 2023 14:38:20 +0000 (16:38 +0200)] 
RELEASE-NOTES: synced

2 years agongtcp2: proper handling of uint64_t when adjusting send buffer
Stefan Eissing [Fri, 19 May 2023 10:00:46 +0000 (12:00 +0200)] 
ngtcp2: proper handling of uint64_t when adjusting send buffer

Fixes #11149
Closes #11153

2 years agongtcp2: fix compiler warning about possible null-deref
Stefan Eissing [Fri, 19 May 2023 07:33:59 +0000 (09:33 +0200)] 
ngtcp2: fix compiler warning about possible null-deref

- compiler analyzer did not include the call context for this
  static function where the condition had already been checked.
- eleminating the problem by making stream a call parameter

Fixes #11147
Closes #11151

2 years agodocs: document that curl_url_cleanup(NULL) is a safe no-op
Emanuele Torre [Fri, 19 May 2023 01:34:07 +0000 (03:34 +0200)] 
docs: document that curl_url_cleanup(NULL) is a safe no-op

This has always been the case, but it was not documented.

The paragraph was copied verbatim from curl_easy_cleanup.3

Closes #11150

2 years agoselect: avoid returning an error on EINTR from select() or poll()
Antoine Pitrou [Thu, 18 May 2023 19:39:05 +0000 (21:39 +0200)] 
select: avoid returning an error on EINTR from select() or poll()

This was already done for the poll() and select() calls
made directly from Curl_poll(), but was missed in
Curl_wait_ms(), which is called when there are no fds
to wait on.

Fixes #11135
Closes #11143

2 years agovquic.c: make recvfrom_packets static, avoid compiler warning
Daniel Stenberg [Thu, 18 May 2023 23:02:28 +0000 (01:02 +0200)] 
vquic.c: make recvfrom_packets static, avoid compiler warning

warning: no previous prototype for 'recvfrom_packets'

Reported-by: Keitagit-kun on github
Fixes #11146
Closes #11148

2 years agourlapi: allow numerical parts in the host name
Daniel Stenberg [Wed, 17 May 2023 22:31:17 +0000 (00:31 +0200)] 
urlapi: allow numerical parts in the host name

It can only be an IPv4 address if all parts are all digits and no more than
four parts, otherwise it is a host name. Even slightly wrong IPv4 will now be
passed through as a host name.

Regression from 17a15d88467 shipped in 8.1.0

Extended test 1560 accordingly.

Reported-by: Pavel Kalyugin
Fixes #11129
Closes #11131

2 years agohttp2: double http request parser max line length
Emilio Cobos Álvarez [Thu, 18 May 2023 16:22:57 +0000 (18:22 +0200)] 
http2: double http request parser max line length

This works around #11138, by doubling the limit, and should be a
relatively safe fix.

Ideally the buffer would grow as needed and there would be no need for a
limit? But that might be follow-up material.

Fixes #11138
Closes #11139

2 years agoconfigure: fix --help alignment
Emanuele Torre [Thu, 18 May 2023 19:16:56 +0000 (21:16 +0200)] 
configure: fix --help alignment

AC_ARG_ENABLE seems to only trim off whitespace from the start and end
of its help-string argument, while prepending two spaces of indentation
to all lines.

This means that the two spaces of indentation between the --enable-rtsp
and the --disable-rtsp line were not removed causing ./configure --help
to print:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
      --disable-rtsp          Disable RTSP support

I removed the indentation to fix the issue, now it prints:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
    --disable-rtsp          Disable RTSP support

The --enable-hsts and --disable-hsts lines had the same problems, and
have been fixed too.

Closes #11142

2 years agocmake: repair cross compiling
Deal(一线灵) [Wed, 17 May 2023 17:21:48 +0000 (01:21 +0800)] 
cmake: repair cross compiling

It cannot *run* code for testing purposes when cross-compiling.

Closes #11130

2 years agoconfigure: generate a script to run the compiler
Daniel Stenberg [Tue, 16 May 2023 14:51:14 +0000 (16:51 +0200)] 
configure: generate a script to run the compiler

in the CURL_RUN_IFELSE macro, with LD_LIBRARY_PATH set to the value of
the configure invoke, and not the value that might be used later,
intended for the execution of the output the compiler ouputs.

For example when the compiler uses the same library (like libz) that
configure checks for.

Reported-by: Jonas Bülow
Fixes #11114
Closes #11120

2 years agocf-socket: completely remove the disabled USE_RECV_BEFORE_SEND_WORKAROUND
Stefan Eissing [Tue, 16 May 2023 08:24:07 +0000 (10:24 +0200)] 
cf-socket: completely remove the disabled USE_RECV_BEFORE_SEND_WORKAROUND

Closes #11118

2 years agourlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects
Emanuele Torre [Thu, 18 May 2023 08:48:19 +0000 (10:48 +0200)] 
urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects

curl_url_set(uh, CURLUPART_URL, redirurl, flags)  was not respecing
CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY in the host part of redirurl
when redirecting to an absolute URL.

Closes #11136

2 years agohostip: move easy_lock.h include above curl_memory.h
Colin Cross [Thu, 18 May 2023 17:54:09 +0000 (10:54 -0700)] 
hostip: move easy_lock.h include above curl_memory.h

Similar to #9561, move easy_lock.h above curl_memory.h to fix building
against musl libc.

Closes #11140

2 years agocurl_easy_getinfo: clarify on return data types
Hind Montassif [Wed, 17 May 2023 12:17:06 +0000 (14:17 +0200)] 
curl_easy_getinfo: clarify on return data types

Closes #11126

2 years agochecksrc: disallow spaces before labels
Emanuele Torre [Thu, 18 May 2023 04:54:18 +0000 (06:54 +0200)] 
checksrc: disallow spaces before labels

Out of 415 labels throughout the code base, 86 of those labels were
not at the start of the line. Which means labels always at the start of
the line is the favoured style overall with 329 instances.

Out of the 86 labels not at the start of the line:
* 75 were indented with the same indentation level of the following line
* 8 were indented with exactly one space
* 2 were indented with one fewer indentation level then the following
  line
* 1 was indented with the indentation level of the following line minus
  three space (probably unintentional)

Co-Authored-By: Viktor Szakats
Closes #11134

2 years agocookie: update the comment on cookie length and size limits
Daniel Stenberg [Wed, 17 May 2023 14:12:48 +0000 (16:12 +0200)] 
cookie: update the comment on cookie length and size limits

To refer to the proper cookie RFC and the upcoming RFC refresh.

Closes #11127

2 years agourl: provide better error message when URLs fail to parse
Daniel Stenberg [Thu, 18 May 2023 12:27:01 +0000 (14:27 +0200)] 
url: provide better error message when URLs fail to parse

By providing the URL API error message into the error message.

Ref: #11129
Closes #11137

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 18 May 2023 11:45:54 +0000 (13:45 +0200)] 
RELEASE-NOTES: synced

bumped to 8.1.1

2 years agoos400: update chkstrings.c
jonrumsey [Wed, 17 May 2023 19:59:06 +0000 (20:59 +0100)] 
os400: update chkstrings.c

Compensate changes for recent changes to urldata.h to reclassify
STRING_AWS_SIGV4.

Fixes #11132
Closes #11133

2 years agoRELEASE-NOTES: synced curl-8_1_0
Daniel Stenberg [Wed, 17 May 2023 06:05:04 +0000 (08:05 +0200)] 
RELEASE-NOTES: synced

2 years agoTHANKS: contributors from the 8.1.0 release
Daniel Stenberg [Wed, 17 May 2023 06:05:04 +0000 (08:05 +0200)] 
THANKS: contributors from the 8.1.0 release