]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 hours agocmake/FindGSS: fix processing C header path options master
Viktor Szakats [Thu, 3 Jul 2025 00:16:11 +0000 (02:16 +0200)] 
cmake/FindGSS: fix processing C header path options

When processing `--cflags` received from `krb5-config` for `gssapi`:

- fix to not break on multiple `-I` options. Before this patch only
  the first `-I` option was processed as a header directory, subsequent
  ones ended up in C flags as a raw directory, without the `-I` arg.
  Follow-up to 558814e16d84aa202c5ccc0c8108a9d728e77a58

- fix to not duplicate C flags.
  Regression from 146759716cbacfd453b9fb13d1096f0595424a6c #14430

- drop local variable `_val` by re-using `_flag`.

- tidy up comments.

Ref: https://github.com/curl/curl/issues/17802#issuecomment-3029455984

Closes #17805

13 hours agoCI: skip CI builds that just touch Dockerfile
Dan Fandrich [Thu, 3 Jul 2025 01:26:59 +0000 (18:26 -0700)] 
CI: skip CI builds that just touch Dockerfile

This file sees regular updates but isn't used by any CI build.

24 hours agoCURLSHOPT_SHARE.md: mention multi-threading requires callbacks
Jay Satiro [Mon, 30 Jun 2025 05:53:43 +0000 (01:53 -0400)] 
CURLSHOPT_SHARE.md: mention multi-threading requires callbacks

- Explain that if data is shared in multiple threads then the user must
  set mutex callbacks.

Reported-by: afengsoft@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/17774
Closes https://github.com/curl/curl/pull/17782

42 hours agoVULN-DISCLOSURE-POLICY: minor language polish
Daniel Stenberg [Tue, 1 Jul 2025 20:45:03 +0000 (22:45 +0200)] 
VULN-DISCLOSURE-POLICY: minor language polish

Closes #17799

42 hours agodocs: fix two typos
Ameda Amahru [Tue, 1 Jul 2025 12:33:19 +0000 (14:33 +0200)] 
docs: fix two typos

Closes #17795

42 hours agoVULN-DISCLOSURE-POLICY.md: fix typos
Marcel Lang [Tue, 1 Jul 2025 13:06:24 +0000 (15:06 +0200)] 
VULN-DISCLOSURE-POLICY.md: fix typos

Closes #17796

45 hours agoappveyor: drop VS2008 CI job, move OpenSSL 1.0.2 to VS2010
Viktor Szakats [Tue, 1 Jul 2025 17:16:02 +0000 (19:16 +0200)] 
appveyor: drop VS2008 CI job, move OpenSSL 1.0.2 to VS2010

It became flaky today, possible due to an upstream issue. Drop this CI job
also because VS2008 is going to be deprecated soon.

Example:
```
1>------ Build started: Project: curlu, Configuration: Debug Win32 ------
1>Compiling...
1>Project : error PRJ0003 : Error spawning 'cl.exe'.
1>Build log was saved at "file://c:\projects\curl\_bld\lib\curlu.dir\Debug\BuildLog.htm"
1>curlu - 1 error(s), 0 warning(s)
[...]
8>Linking...
8>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\curlu-d.lib'
8>Build log was saved at "file://c:\projects\curl\_bld\tests\unit\units.dir\Debug\BuildLog.htm"
8>Test units - 1 error(s), 0 warning(s)
[...]
========== Build: 7 succeeded, 2 failed, 5 up-to-date, 0 skipped ==========
[...]
Command exited with code 1
```

Other times with no visible error all:
```
========== Build: 9 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========
[...]
Command exited with code 1
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52330703/job/ooqxq0b8ftbsv640#L413

Follow-up to 8c9a9b87c20fd9184e0a6c7b5e2c42d727f0db62 #17725
Follow-up to 63e513b106113db0b1b68bab347b80cb4cef4e65 #17380

Closes #17798

46 hours agoDockerfile: update debian:bookworm-slim Docker digest to 6ac2c08
renovate[bot] [Tue, 1 Jul 2025 07:54:29 +0000 (07:54 +0000)] 
Dockerfile: update debian:bookworm-slim Docker digest to 6ac2c08

Closes #17788

2 days agoeasygetopt: fix curl logo in header comment
Viktor Szakats [Tue, 1 Jul 2025 11:14:18 +0000 (13:14 +0200)] 
easygetopt: fix curl logo in header comment

Closes #17793

2 days agocurlinfo: provide the 'digest' feature
Daniel Stenberg [Mon, 30 Jun 2025 22:09:37 +0000 (00:09 +0200)] 
curlinfo: provide the 'digest' feature

... since the tests check for the feature using this name, we
accidentally had lots tests not run because this provided the
`digest-auth` feature that was not checked for.

Closes #17786

2 days agotests: move GSS-API dynamic stub into debug-mode libcurl
Viktor Szakats [Tue, 24 Jun 2025 23:45:04 +0000 (01:45 +0200)] 
tests: move GSS-API dynamic stub into debug-mode libcurl

Replace the `libstubgss.so`-based overload solution with one built into
libcurl at compile-time.

The previous, `LD_PRELOAD`-based, solution was non-portable, allowlisted
for Linux, BSD and Solaris. It also required non-debug builds, which
turned out to be an accidental condition:
7d342c723c5ae8e9312210936287810741f40bc5. It also required a curl tool
built against a shared libcurl. Detecting this condition wasn't always
accurate, e.g. with certain cmake configurations.

The overload solution also didn't work on macOS, though it theoretically
should have:
- #17653
- #2394

Experiments on making the overload solution work in more envs:
- #17759
  That revealed that it also did not work on NetBSD, in CI.

The replacement solution is overloading the necessary GSS-API functions
for test 2056 and 2057 at compile time. It requires a debug-enabled curl
build (due to its insecure nature).

This makes these tests run on all platforms. Including most GSS jobs in
CI, that are running tests. (the exception is old-linux, non-debug jobs,
where it felt overkill to enable debug for this.)

The refactored GSS stub code needs to overload less than before because
it's free to use the official GSS API. (This didn't work with
the overload solution on Alpine for example). It can also use libcurl
functions, allowing to replace `snprintf()` with `msnprintf()`.

OS/400 is also overloading GSS API functions. I haven't tested how this
works after this PR. In theory it should, because this PR doesn't rely
on preprocessor overrides.

Note that for future GSS tests, it may be necessary to stub these GSS
API functions: `gss_inquire_context()`, `gss_unwrap()`, `gss_wrap()`.
They are on codepaths not (yet) touched by tests.

Also:
- stub-gss: check for token buffer overrun.
- stub-gss: replace size macros with `sizeof()`.
- GHA: enable debug for some jobs with GSS.
- GHA/linux: ignore results for 2056 and 2057 in the valgrind job.
  They leak the same way as seen with 2077 and 2078.
  Ref: 7020ba797961d38c3bf24539f9bb407e0586274d #17462
  Ref: 146759716cbacfd453b9fb13d1096f0595424a6c #14430
- GHA/linux: fix to ignore `gss_import_name()` leaks in valgrind builds.
  only.
- lib/vauth/krb5_gssapi: reduce variable scope.
- lib/vauth/spnego_gssapi: reduce variable scope.
- tests/libtest: drop code and build logic dealing with `libstubgss`.
- runtests:
  - drop `ld_preload` feature.
  - drop special handling of `LD_PRELOAD` env in tests.
  - drop logic dealing with shared curl tool detection.
  - drop `LD_PRELOAD` envs from tests.

Follow-up to 56d949d31ad182a22bd3bad25b1a902b635d549d #1687

Closes #17752

2 days agounit tests: extract "private" prototypes at build time
Daniel Stenberg [Sun, 29 Jun 2025 12:33:13 +0000 (14:33 +0200)] 
unit tests: extract "private" prototypes at build time

In order to do unit tests for private functions, functions that are
marked UNITTEST but without a global scope in the library, functions
that do not have prototypes in their corresponding header file, unit
tests previously brought their own private prototype *copy* into the
unit test.

This was error-prone when the internal function changes but the change
might be missed in the unit test which then uses an outdated prototype
copy for testing.

This change removes the private prototypes from unit tests and instead
introduces a C file parser that parses the specific C files and extracts
the necessary unit test prototypes into a generated header file for unit
tests to use. This geneated lib/unitprotos.h header is then included by
unit tests that need private prototypes.

Assisted-by: Viktor Szakats
Closes #17750

2 days agoGHA: fix zizmor 1.10.0 warnings, update names
Viktor Szakats [Sat, 28 Jun 2025 18:22:11 +0000 (20:22 +0200)] 
GHA: fix zizmor 1.10.0 warnings, update names

Job `name:` now mandatory in zizmor.

Also:
- enclose `name:` values in single-quotes, for uniformity.
- drop `name: checkout` where set, for uniformity.
- dist: also install with cmake.
- dist: replace `make` with `cmake --build` for cmake.
  (to make this make-tool agnostic)
- appveyor-status: double-quote shell arguments.
- tweak existing names to be shorter, to sync terms and style across
  jobs and steps.

Ref: https://github.com/zizmorcore/zizmor/releases/tag/v1.10.0

Closes #17773

2 days agolib: drop two interim macros in favor of native libcurl API calls
Viktor Szakats [Sat, 28 Jun 2025 10:17:30 +0000 (12:17 +0200)] 
lib: drop two interim macros in favor of native libcurl API calls

Drop `strcasecompare` and `strncasecompare` in favor of libcurl API
calls `curl_strequal` and `curl_strnequal` respectively.

Also drop unnecessary `strcase.h` includes. Include `curl/curl.h`
instead where it wasn't included before.

Closes #17772

3 days agodocs/CONTRIBUTE: fix broken link
Fabrício Canedo [Sun, 29 Jun 2025 16:18:06 +0000 (13:18 -0300)] 
docs/CONTRIBUTE: fix broken link

Add the missing "docs" directory in the link.

Closes #17780

3 days agomulti: remove careful bounds check as coverity says it is not needed
Stefan Eissing [Mon, 30 Jun 2025 07:24:13 +0000 (09:24 +0200)] 
multi: remove careful bounds check as coverity says it is not needed

And we all hope that future code changes will not make it necessary
again or this will all be blamed on you, coverity!

Closes #17784

3 days agocf-socket: make socket data_pending a nop
Stefan Eissing [Mon, 30 Jun 2025 06:53:31 +0000 (08:53 +0200)] 
cf-socket: make socket data_pending a nop

Eliminating the socket readability check in the socket connection
filters for the 'data_pending' callback. Improves performance of
handling of transfers, up to ~30%, depending on parallelism and response
size.

Whatever `data_pending()` once was, its semantics are now:
"Is there anything buffered in the connection filters that needs
 receive?"
Any checks of the socket's readability are done via `multi_wait()`
and friends.

Fix the one place in HTTP/1 proxy code that checked `data_pending()` and
did an early return if false. Remove that check and actually try to
receive data every time.

Closes #17785

4 days agoRELEASE-NOTES: synced rc-8_15_0-2
Daniel Stenberg [Sun, 29 Jun 2025 15:02:37 +0000 (17:02 +0200)] 
RELEASE-NOTES: synced

4 days agoGHA: make the spacecheck say line number for trailing space errors
Daniel Stenberg [Sun, 29 Jun 2025 12:48:05 +0000 (14:48 +0200)] 
GHA: make the spacecheck say line number for trailing space errors

As it can be quite confusing and frustrating without it.

Closes #17777

4 days agoVULN-DISCLOSURE-POLICY: all reports should be disclosed
Daniel Stenberg [Sun, 29 Jun 2025 14:17:49 +0000 (16:17 +0200)] 
VULN-DISCLOSURE-POLICY: all reports should be disclosed

As a matter of policy.

Closes #17778

4 days agofirefox-db2pem: avoid use of eval in script
Dan Fandrich [Fri, 27 Jun 2025 18:07:10 +0000 (11:07 -0700)] 
firefox-db2pem: avoid use of eval in script

This could potentially be exploited by manipulating nicknames in the
cert DB.

Reported-by: behindtheblackwall on hackerone
Closes #17766

5 days agocmake: fix generator expression in docs/examples
Viktor Szakats [Fri, 27 Jun 2025 23:41:33 +0000 (01:41 +0200)] 
cmake: fix generator expression in docs/examples

To pass the MSVC-specific macro to MSVC only.

Closes #17767

5 days agochecksrc: reduce exceptions, apply again to curlx
Viktor Szakats [Fri, 27 Jun 2025 12:21:44 +0000 (14:21 +0200)] 
checksrc: reduce exceptions, apply again to curlx

- tests/libtest: move exception to `stub_gssapi.h`.
- tests/libtest: move remaining exception to `testtrace.c`.
- tests/server: drop obsolete exception.
- docs/examples: move `BANNEDFUNC` exceptions to local files (3 lines).
- docs/examples: move `ERRNOVAR` exception to `ephiperfifo.c`.
- docs/examples: drop `typedef struct` (8 files).
- lib/curlx: add `.checksrc` with banned funcs copied from lib.
- checksrc: ban `strncpy`, `strtok_r`, `strtoul` by default.
  Drop local bans. Add exception for `strtoul` to `tests/server'.
- lib, src: sync banned funcs.

Also:
- REUSE: drop `stunnel.pem`, it no longer exists.
- docs/examples: formatting.
- docs/examples: simplify some `sizeof()`s.

Closes #17764

5 days agolib: replace scache no-op macros with `#ifdef`
Viktor Szakats [Fri, 27 Jun 2025 07:03:24 +0000 (09:03 +0200)] 
lib: replace scache no-op macros with `#ifdef`

To avoid warning/error in no-SSL, non-unity builds:
```
lib/multi.c:273:5: error: code will never be executed [-Werror,-Wunreachable-code]
273 |     goto error;
    |     ^~~~~~~~~~
```

Reported-by: Marcel Raad
Fixes #17754
Closes #17760

6 days agolib2082: drop `typedef struct`
Viktor Szakats [Fri, 27 Jun 2025 09:13:13 +0000 (11:13 +0200)] 
lib2082: drop `typedef struct`

To not need the checksrc exception `disable TYPEDEFSTRUCT`.

Follow-up to a517378de58358a85b7cfe9efecb56051268f629 #7477

Closes #17763

6 days agotests/libtest: drop a checksrc exception
Viktor Szakats [Fri, 27 Jun 2025 09:09:45 +0000 (11:09 +0200)] 
tests/libtest: drop a checksrc exception

Follow-up to a0a1df5af9b3f11125d1a995c01b7c04cfec54e4 #17414

Closes #17762

6 days agobufq: change read/write signatures
Stefan Eissing [Thu, 26 Jun 2025 08:26:35 +0000 (10:26 +0200)] 
bufq: change read/write signatures

Change the signature of `bufq` functions from

* `ssize_t Curl_bufq_*(..., CURLcode *err)` to
* `CURLcode Curl_bufq_*(..., size_t *pn)`

This allows us to write slightly less code and avoids the ssize_t/size_t
conversions in many cases. Also, it gets the function in line with all
the other send/recv signatures.

Added helper functions in `cfilters.h` for sending from/receving into
a bufq.

Fuzzer now fails to build due to these changes and its testing of
the bufq API.

Closes #17396

6 days agoVULN-DISCLOSURE-POLICY: exclude not installed software
Daniel Gustafsson [Fri, 27 Jun 2025 10:08:01 +0000 (12:08 +0200)] 
VULN-DISCLOSURE-POLICY: exclude not installed software

Flaws in any script or compiled artifact which isn't installed by
default is not considered to be security vulnerabilities.

Closes #17761
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
6 days agocurl-config: fix whitespace in usage text
Viktor Szakats [Thu, 26 Jun 2025 22:44:01 +0000 (00:44 +0200)] 
curl-config: fix whitespace in usage text

Closes #17758

6 days agoruntests: fix `LD_PRELOAD` detection for cmake-built curl binaries
Viktor Szakats [Thu, 26 Jun 2025 21:13:43 +0000 (23:13 +0200)] 
runtests: fix `LD_PRELOAD` detection for cmake-built curl binaries

CMake builds by default don't include a triplet in the `curl -V` output,
but a CMake-specific OS string, which is usually capitalized or stylized,
e.g. "Linux", or "FreeBSD". Make the regexp expression case-insensitive
to handle this.

Follow-up to 171b62375965fbf5f02e66f587a83043059ae41a #17653

Closes #17756

7 days agohttp: fix build with cookies and HSTS disabled 17753/head
Marcel Raad [Thu, 26 Jun 2025 09:11:18 +0000 (11:11 +0200)] 
http: fix build with cookies and HSTS disabled

All arguments and local variables in `http_header_s` were unused when
both `CURL_DISABLE_COOKIES` and `CURL_DISABLE_HSTS` were defined.

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

7 days agotests: fix `BUNDLE` variable references in `Makefile.am`
Viktor Szakats [Thu, 26 Jun 2025 08:25:07 +0000 (10:25 +0200)] 
tests: fix `BUNDLE` variable references in `Makefile.am`

Bug: https://github.com/curl/curl/pull/17750/files#diff-0c866a04cf144e1595f64820c652daaa923358d4de1b30ca8baf85c70ec12a2dR83

Closes #17751

7 days agotests: use %b64[] to base64 data in 2056, 2057
Viktor Szakats [Wed, 25 Jun 2025 19:29:56 +0000 (21:29 +0200)] 
tests: use %b64[] to base64 data in 2056, 2057

Follow-up to 63011ac638d83a92294ed5682dbb91484b1ff8d3 #17721

Closes #17748

7 days agoautotools: drop redundant `Makefile.inc` from `EXTRA_DIST` in src
Viktor Szakats [Wed, 25 Jun 2025 18:52:42 +0000 (20:52 +0200)] 
autotools: drop redundant `Makefile.inc` from `EXTRA_DIST` in src

Closes #17747

7 days agobuild: split `.c` and `.h` file lists in tests
Viktor Szakats [Wed, 25 Jun 2025 11:30:23 +0000 (13:30 +0200)] 
build: split `.c` and `.h` file lists in tests

It allows to pass `.h` files only where they are really needed, which is
`EXTRA_DIST` (or `*SOURCES`) for autotools.

Also:
- rename variables to be shorter and consistent.
- drop references to non-local headers. We don't need to pass them as
  dist sources.
- drop empty variables and references, after the above.
- server: add placeholder `UTIL_H`.

Closes #17745

7 days agoDISTROS: update NixOS link
Dan Fandrich [Thu, 26 Jun 2025 06:01:58 +0000 (23:01 -0700)] 
DISTROS: update NixOS link

7 days agocurl: improve non-blocking STDIN performance
DoI [Tue, 10 Jun 2025 08:59:09 +0000 (20:59 +1200)] 
curl: improve non-blocking STDIN performance

Using a select() call on supported platforms to check for data with a
given timeout

Closes #17566

7 days agoautotools: detect and link `brotlicommon` library for brotli
Viktor Szakats [Mon, 23 Jun 2025 17:09:30 +0000 (19:09 +0200)] 
autotools: detect and link `brotlicommon` library for brotli

`brotlicommon` is necessary when linking brotli statically.
E.g. on Alpine Linux with `PKG_CONFIG='pkg-config --static'`.

It also syncs brotli libs listed in `libcurl.pc` and `curl-config` with
those generated by cmake, which already listed `brotlicommon` there.

Also:
- remove workaround from GHA/configure-vs-cmake CI jobs.

Ref: https://github.com/curl/curl/commit/69cda1b7048ce7651b68040c8c4f14356c93033f
Follow-up to f2adb3b6d73cad0c28ec8a32f5fa969d0f6378a0 #15431
Reported-by: Christopher Boyd
Fixes #17678
Closes #17723

8 days agocmake: enable soversion by default for OpenHarmony OS
SC404 [Wed, 25 Jun 2025 08:45:59 +0000 (16:45 +0800)] 
cmake: enable soversion by default for OpenHarmony OS

Closes #17743

8 days agolib: address singleuse issues
Daniel Stenberg [Tue, 24 Jun 2025 14:26:22 +0000 (16:26 +0200)] 
lib: address singleuse issues

- markup some functions UNITTEST, so that they are static unless in a
  unit test build

- make some functions #ifdef UNITTESTS as they are only used from unit
  tests

- adjusted unit tests accordingly to use local prototypes for functions
  not global in the library

Closes #17734

8 days agourlapi: use uppercase hex encoding
Daniel Stenberg [Wed, 25 Jun 2025 06:14:58 +0000 (08:14 +0200)] 
urlapi: use uppercase hex encoding

For consistency. RFC 3986 section 2.1 says:

  "URI producers and normalizers should use uppercase hexadecimal digits
  for all percent-encodings."

Reported-by: Jeroen Ooms
Fixes #17685
Closes #17739

8 days agoruntests.pl: fix sprintf() using one too many %s
Daniel Stenberg [Wed, 25 Jun 2025 07:19:24 +0000 (09:19 +0200)] 
runtests.pl: fix sprintf() using one too many %s

Closes #17740

8 days agodocs: reflect that delimiter-separated capath is only OpenSSL
Keno Fischer [Tue, 24 Jun 2025 22:33:12 +0000 (18:33 -0400)] 
docs: reflect that delimiter-separated capath is only OpenSSL

curl passes down the capath directly to the backends. OpenSSL will then
delimiter-separate this path internally to support multiple directories
(using its certificate hash scheme). However, the other backends
(wolfSSL, mbedTLS, gnutls) only expect a single directory (and do not
use the hash scheme, preferring to iterate the directory and load all
files). This adjusts the `--capath` documentation to reflect that
multiple paths is an OpenSSL-specific feature. Alternatively, curl could
delimiter-separate these itself, but I'm not sure it's worth it.

Ref https://github.com/JuliaLang/NetworkOptions.jl/issues/41

Closes #17737

8 days agoautotools: drop headers from src mk-unity rules (fixup)
Viktor Szakats [Wed, 25 Jun 2025 08:10:37 +0000 (10:10 +0200)] 
autotools: drop headers from src mk-unity rules (fixup)

Unnecessarily added in f4649425f2d4a7bef1ce628f2450ee2a4477a06e.

Follow-up to f4649425f2d4a7bef1ce628f2450ee2a4477a06e #17727

Closes #17742

8 days agobuild: stubgss tidy-ups (in tests)
Viktor Szakats [Tue, 24 Jun 2025 23:47:22 +0000 (01:47 +0200)] 
build: stubgss tidy-ups (in tests)

- cmake: avoid running clang-tidy twice.
- autotools: do not pass curl/libtest-specific macros.

Also:
- autotools: drop `CFLAG_CURL_SYMBOL_HIDING` from libtests.
   Unused since 09437d8cd46ebc5fefbb578bc11d0ffc522de2f0 #14695

Closes #17738

8 days agobuild: fix libcurltool with cmake and tunits, related tidy-ups
Viktor Szakats [Mon, 23 Jun 2025 21:29:59 +0000 (23:29 +0200)] 
build: fix libcurltool with cmake and tunits, related tidy-ups

Sync how libcurltool is built in different modes and build systems.

cmake:
- build libcurltool with curlx when building shared libcurl.
  To make it possible to use standard libcurl when linking tunits.
  Also syncing this with autotools.
  The remaining difference is that cmake allows to select shared or
  static for curl tool and tests/examples independently.
- fix to link with libcurl instead of libcurlu.
  To sync with autotools and to link with the standard libcurl for
  tool unit tests.
- fix `source_group()` to always include curlx sources.
- add missing 'curlx header files' source group.

autotools:
- build libcurltool without curlx when building static libcurl in
  non-unity builds.
  To avoid double compilation, just to be thrown away at link time.
  Also to sync with unity builds.

both:
- sync source order between autotools and cmake.
- make sure to pass all headers with both autotools and cmake.
  This is a no-op with cmake. Maybe a future patch should make sure
  to not pass those to remove that noise.

Ref: #17696

Closes #17727

8 days agotests: constify, make consts static
Viktor Szakats [Tue, 24 Jun 2025 14:50:23 +0000 (16:50 +0200)] 
tests: constify, make consts static

- lib509: constify an input string.
- add `static` to const data, where missing.
- tool1394: fix indentation.

Closes #17736

8 days agotests/server: move memory init to `memptr.c`
Viktor Szakats [Tue, 24 Jun 2025 14:42:17 +0000 (16:42 +0200)] 
tests/server: move memory init to `memptr.c`

To sync with tests/libtest.

Closes #17735

8 days agomk-lib1521: replace `printf` with `curl_mprintf`
Viktor Szakats [Tue, 24 Jun 2025 12:14:11 +0000 (14:14 +0200)] 
mk-lib1521: replace `printf` with `curl_mprintf`

Ref: #17731

Closes #17732

9 days agomulti: xfer table/bitset, handle limits
Stefan Eissing [Tue, 24 Jun 2025 10:57:04 +0000 (12:57 +0200)] 
multi: xfer table/bitset, handle limits

* calculate capacity growth on multi's xfer table and bitsets to
  work correctly when approaching UINT_MAX
* uint-bset: track the first 64bit slot used. This avoids slot scans
  on empty sets.
* uint-tbl: remove restriction to grow ot UINT_MAX, it is multi's
  job to enforce limits suitable for its use
* test751: use curl_mfprintf() for error messages

Closes #17731

9 days agobufq: remove the unused Curl_bufq_unwrite function
Daniel Stenberg [Tue, 24 Jun 2025 07:15:45 +0000 (09:15 +0200)] 
bufq: remove the unused Curl_bufq_unwrite function

Follow-up to 02edae54e8

Closes #17730

9 days agocmake: check USE_WINDOWS_SSPI when adding secur32 to CURL_LIBS
Joel Depooter [Tue, 24 Jun 2025 01:14:24 +0000 (18:14 -0700)] 
cmake: check USE_WINDOWS_SSPI when adding secur32 to CURL_LIBS

Instead of CURL_WINDOWS_SSPI.

When running CMake on Windows with no additional parameters (ie default
build configuration), the generated project files do not include the
`secur32.lib` library in the linker settings. This is because
the relevant check was looking at `CURL_WINDOWS_SSPI` instead of
`USE_WINDOWS_SSPI`.

`USE_WINDOWS_SSPI` is enabled when building with SChannel (the default
on Windows), or if `CURL_WINDOWS_SSPI` is specified on the command line.

Follow-up to 0d71b18153c8edb996738f8a362373fc72d0013b #17413

Closes #17728

9 days agoappveyor: move old cmake from VS2008 to VS2010
Viktor Szakats [Mon, 23 Jun 2025 19:29:47 +0000 (21:29 +0200)] 
appveyor: move old cmake from VS2008 to VS2010

In preparation of dropping the VS2008 job. To keep testing old cmake
(3.12.2) after that.

Closes #17725

9 days agobuild: stop checking for `sys/stat.h`
Viktor Szakats [Mon, 23 Jun 2025 17:48:19 +0000 (19:48 +0200)] 
build: stop checking for `sys/stat.h`

It has been used unconditionally in `src` and `tests` since at least
2011-09-19 via fdecb56cbfcafe5b770c4181133655b89973f41e. There are
earlier unguarded references in `tests`.

Also de-duplicate to include it just once.

Ref: https://github.com/curl/curl/pull/17717#issuecomment-2996631026

Closes #17724

9 days agotidy-up: replace `<memdebug.h>` with `"memdebug.h"` (src, units)
Viktor Szakats [Mon, 23 Jun 2025 14:53:33 +0000 (16:53 +0200)] 
tidy-up: replace `<memdebug.h>` with `"memdebug.h"` (src, units)

Closes #17722

9 days agounit1302: expand the base64 encode/decode tests
Daniel Stenberg [Mon, 23 Jun 2025 20:53:30 +0000 (22:53 +0200)] 
unit1302: expand the base64 encode/decode tests

Closes #17726

10 days agotests/server: de-dupe/merge three `sockdaemon()` clones into one
Viktor Szakats [Mon, 23 Jun 2025 12:51:37 +0000 (14:51 +0200)] 
tests/server: de-dupe/merge three `sockdaemon()` clones into one

Also: tidy up `if()` expressions here and there.

Follow-up to f4f25505df1d2ede727071eb0c518368a206f64b #15000

Closes #17719

10 days agobuild: drop explicit curlx from hdr paths, refer headers with `curlx/` prefix
Viktor Szakats [Fri, 20 Jun 2025 07:20:45 +0000 (09:20 +0200)] 
build: drop explicit curlx from hdr paths, refer headers with `curlx/` prefix

To make all src and test code refer to curlx headers the same way.

Also:
- src: move `curlx.h` include to `tool_setup.h`.
- src/tool_setup.h: drop stray `curlx/timeval.h`.
- servers: de-duplicate `curlx.h` and `curl_setup.h` includes.
- libtests, units: drop stray curlx sub-headers in favor of
  `<curlx/curlx.h>`.
- tests: include `curlx.h` with `<>` instead of `""`. To match
  other parts of the codebase.

Closes #17680

10 days agotests: use %b64[] to base64 data
Daniel Stenberg [Mon, 23 Jun 2025 13:53:54 +0000 (15:53 +0200)] 
tests: use %b64[] to base64 data

... instead of storing the data base64 encoded.

Closes #17721

10 days agoasyn-ares: remove redundant NULL check
NINIKA [Mon, 23 Jun 2025 14:12:57 +0000 (17:12 +0300)] 
asyn-ares: remove redundant NULL check

Closes #17720

10 days agotests: drop unused or redundant includes
Viktor Szakats [Mon, 23 Jun 2025 08:15:16 +0000 (10:15 +0200)] 
tests: drop unused or redundant includes

Closes #17717

10 days agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 23 Jun 2025 11:41:12 +0000 (13:41 +0200)] 
RELEASE-NOTES: synced

10 days agomulti: clear the dirty set of transfers no longer processing
Stefan Eissing [Mon, 23 Jun 2025 08:02:36 +0000 (10:02 +0200)] 
multi: clear the dirty set of transfers no longer processing

When a transfer is no longer processed, it might still apear in the
dirty bitset. Clear the dirty bit when this condition is encountered.

Closes #17718

10 days agotests/libtest: use `curltime` from curlx
Viktor Szakats [Mon, 23 Jun 2025 07:01:02 +0000 (09:01 +0200)] 
tests/libtest: use `curltime` from curlx

Replacing the local implementation.

Closes #17716

10 days agotests/libtest: call `curlx_now_init()` for unit 1399, 2600 (Windows)
Viktor Szakats [Mon, 23 Jun 2025 06:52:21 +0000 (08:52 +0200)] 
tests/libtest: call `curlx_now_init()` for unit 1399, 2600 (Windows)

Follow-up to 35d0c047ce713298f15771649ffe7662404628f0 #17641

Closes #17714

10 days agotests/dnsd: read config from file
Daniel Stenberg [Thu, 5 Jun 2025 20:59:24 +0000 (22:59 +0200)] 
tests/dnsd: read config from file

Make the <dns> tag in a test case control what is stored there. Also
documented. Make test 2102 and 2103 use the new tag.

Lets the test case config the A and AAAA contents the server replies
with. Initial work for the HTTPS RR exists, but does not yet work.

Closes #17543

10 days agolibcurl-env.md: drop LOGNAME, USER and NTLMUSER
Daniel Stenberg [Sun, 22 Jun 2025 22:25:00 +0000 (00:25 +0200)] 
libcurl-env.md: drop LOGNAME, USER and NTLMUSER

They were used for NTLM-WB, which support was removed for back in 8.8.0

Closes #17713

10 days agocmake: sync tests scripts with each other and autotools (more)
Viktor Szakats [Sun, 22 Jun 2025 20:19:20 +0000 (22:19 +0200)] 
cmake: sync tests scripts with each other and autotools (more)

Closes #17711

10 days agocmake: replace the way clang-tidy verifies tests, fix issues found
Viktor Szakats [Sun, 22 Jun 2025 01:17:33 +0000 (03:17 +0200)] 
cmake: replace the way clang-tidy verifies tests, fix issues found

Replace existing `mk-unity.pl` `--embed` workaround with running
`clang-tidy` manually on individual test source instead. This aligns
with how clang-tidy works and removes `mk-unity.pl` from the solution.

Also:
- mqttd: fix potentially uninitialized buffer by zero filling it.
  ```
  tests/server/mqttd.c:484:41: error: The left operand of '<<' is a garbage value
    [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
    484 |       payload_len = (size_t)(buffer[10] << 8) | buffer[11];
        |                                         ^
  [...]
  tests/server/mqttd.c:606:45: error: The left operand of '<<' is a garbage value
    [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
    606 |       topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
        |                                             ^
  ```
- sockfilt: fix potential out-of-bound pointer:
  ```
  tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer
     with size 17010 but should be a buffer with size equal to or greater than
     the value of the 3rd argument (which is 18446744073709551615)
     [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
   1128 |         ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
        |                                 ^
  ```
- clang-tidy: suppress bogus `bzero()` warnings that happens
  inside the notorious `FD_ZERO()` macros, on macOS.

Ref: https://github.com/curl/curl/pull/17680#issuecomment-2991730158

Closes #17705

10 days agoGHA/windows: drop MSYS2 runtime downgrades
Viktor Szakats [Sun, 22 Jun 2025 20:44:24 +0000 (22:44 +0200)] 
GHA/windows: drop MSYS2 runtime downgrades

No longer necessary after bumping the default runtime to a version
fixing the previously experienced performance drop.

Thanks to MSYS2/Cygwin teams for the help and fix.

Follow-up to 9a26be1e6ad45eb6c46af1d7a5e0be273b14fe1b #17708
Follow-up to d4896d94f2e9530d47bf519c9d9b790720bf10a4 #16424

Closes #17710

10 days agoGHA: update msys2/setup-msys2 digest to 40677d3
renovate[bot] [Sun, 22 Jun 2025 19:42:02 +0000 (19:42 +0000)] 
GHA: update msys2/setup-msys2 digest to 40677d3

After:
MINGW64_NT-10.0-20348 runnervmdy573 3.6.3-1f8def9f.x86_64 2025-06-18 07:19 UTC x86_64 Msys

Before:
MINGW64_NT-10.0-20348 runnervmdy573 3.5.7-2644508f.x86_64 2025-02-06 19:32 UTC x86_64 Msys

Closes #17708

10 days agorustls: don't try printing the not provided file
Yedaya Katsman [Sun, 22 Jun 2025 13:02:28 +0000 (16:02 +0300)] 
rustls: don't try printing the not provided file

Caught by gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0:
```
vtls/rustls.c: In function ‘cr_connect’:
vtls/rustls.c:857:61: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  857 |     failf(data, "rustls: must provide certificate with key '%s'",
      |                                                             ^~
```

Closes #17704

10 days agoh2_serverpush: fix file handle leaks reported by clang-tidy
Viktor Szakats [Sun, 22 Jun 2025 08:18:12 +0000 (10:18 +0200)] 
h2_serverpush: fix file handle leaks reported by clang-tidy

clang-tidy (20.1.6) found it locally consistently. Missed in CI.

Closes #17706

10 days agocmake: configure c-ares header directory in project root (was: lib)
Viktor Szakats [Sun, 22 Jun 2025 18:10:55 +0000 (20:10 +0200)] 
cmake: configure c-ares header directory in project root (was: lib)

The c-ares header directory was added to the header path within `lib`,
as opposed to every other dependency which added them in the root
`CMakeLists.txt`. Such exception is no longer necessary. This patch
aligns c-ares header setup with the rest of dependencies. And also with
autotools, which also makes no exception here.

Cherry-picked from #17705
Cherry-picked from #16973

Closes #17707

11 days agotests: make individual test sources compile cleanly
Viktor Szakats [Sat, 21 Jun 2025 23:10:59 +0000 (01:10 +0200)] 
tests: make individual test sources compile cleanly

Tidy up headers and includes to ensure all individual test source
compile cleanly (but not link). To allow running clang-tidy (and
possibly other static analyzers) on them. It also improves readability
and allows to verify them locally, without the bundle logic.

clang-tidy ignores #included C files, so it's blind to bundle C files
the include these tests. The current workaround of embedding has
a couple of downsides:. meaningless filenames and line numbers,
missing issues, messing up self header paths. Thus, running it on
individual sources would be beneficial.

Also:
- de-duplicate includes.
- untangle some includes.
- formatting/indentation fixes.
- merge `getpart.h` into `first.h`.

Ref: https://github.com/curl/curl/pull/17680#issuecomment-2991730158

Closes #17703

11 days agocmake: drop reference to future variable [ci skip]
Viktor Szakats [Sun, 22 Jun 2025 11:19:07 +0000 (13:19 +0200)] 
cmake: drop reference to future variable [ci skip]

Follow-up to 855acb3bb07e0dd06b5722218eb5fded333f7ce0 #17701

11 days agotests/libtest: drop `TEST_HANG_TIMEOUT` redefinition hack
Viktor Szakats [Sun, 22 Jun 2025 09:17:07 +0000 (11:17 +0200)] 
tests/libtest: drop `TEST_HANG_TIMEOUT` redefinition hack

Before this patch the code relied on re-initializing `TEST_HANG_TIMEOUT`
macro before compiling each test, to allow them each to override it to
a custom value for single tests. Thie required re-including `test.h`
into each test.

After this patch this macro becomes a global, immutable, default. Tests
which want to override it can now use alternate macros that do accept
a custom timeout. The only test currently affected is lib1501.

Follow-up to 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590

Closes #17702

11 days agocmake: add target property dumper helper function
Viktor Szakats [Sun, 22 Jun 2025 08:30:07 +0000 (10:30 +0200)] 
cmake: add target property dumper helper function

It's pretty rough and a giant hack, but helps debugging and findind ways
while navigating the CMake maze. I find it sad CMake doesn't have
a built-in function for this that works correctly in all situations.
It's invaluable to be able to see what properties and values an object
has.

It's also possible there is a better solution to this, but I could not
find it.

Cherry-picked from #16973

Closes #17701

11 days agocurl_get_line: make sure lines end with newline
Daniel Stenberg [Sat, 21 Jun 2025 20:35:41 +0000 (22:35 +0200)] 
curl_get_line: make sure lines end with newline

Verify with test 792 and 793

Reported-by: z2_
Closes #17697

11 days agotests/server: drop `memdebug.h`
Viktor Szakats [Sat, 21 Jun 2025 22:56:10 +0000 (00:56 +0200)] 
tests/server: drop `memdebug.h`

It's no longer used in any build configuration.

Follow-up to fffec3d7e90b032a03eee2192e68f8baf913b3b4 #17629

Closes #17700

11 days agodocs: mention that the netrc file works without port numbers
Daniel Stenberg [Sat, 21 Jun 2025 21:34:52 +0000 (23:34 +0200)] 
docs: mention that the netrc file works without port numbers

Closes #17698

11 days agotests/server/util.c: include netinet/in6.h
Daniel Stenberg [Sat, 21 Jun 2025 15:12:14 +0000 (17:12 +0200)] 
tests/server/util.c: include netinet/in6.h

for sockaddr_in6

Reported-by: Randall S. Becker
Bug: https://curl.se/mail/lib-2025-06/0016.html
Closes #17695

12 days agocf: replace the method get_host with query
Stefan Eissing [Thu, 22 May 2025 13:09:58 +0000 (15:09 +0200)] 
cf: replace the method get_host with query

Connection filters had a method `get_host()` which had not really been
documented. Since then, the cf had the `query()` method added. Replace
the separate get_host with query.

Add `CF_QUERY_HOST_PORT` as query to connection filters to retrieve
which remote hostname and port the filter (or its sub-filter) is talking
to. The query is implemented by HTTP and SOCKS filters, all others pass
it through.

Add `Curl_conn_get_current_host()` to retrieve the remote host and port
for a connection. During connect, this will return the host the
connection is talking to right now. Before/After connect, this will
return `conn->host.name`.

This is used by SASL authentication.

Closes #17419

12 days agomulti: add dirty bitset
Stefan Eissing [Wed, 18 Jun 2025 10:34:43 +0000 (12:34 +0200)] 
multi: add dirty bitset

Add a bitset `dirty` to the multi handle. The presence of a transfer int
he "dirty" set means: this transfer has something to do ASAP.

"dirty" is set by multiplexing protocols like HTTP/2 and 3 when
encountering response data for another transfer than the current one.
"dirty" is set by protocols that want to be called.

Implementation:

* just an additional `uint_bset` in the multi handle
* `Curl_multi_mark_dirty()` to add a transfer to the dirty set.
* `multi_runsingle()` clears the dirty bit of the transfer at
   start. Without new dirty marks, this empties the set after
   al dirty transfers have been run.
* `multi_timeout()` immediately gives the current time and
   timeout_ms == 0 when dirty transfers are present.
* multi_event: marks all transfers tracked for a socket as dirty.
  Then marks all expired transfers as dirty. Then it runs
  all dirty transfers.

With this mechanism:

* Most uses of `EXPIRE_RUN_NOW` are replaced by `Curl_multi_mark_dirty()`
* `Curl_multi_mark_dirty()` is cheaper than querying if a transfer is
  already dirty or set for timeout. There is no need to check, just do it.
* `data->state.select_bits` is eliminated. We need no longer to
  simulate a poll event to make a transfer run.

Closes #17662

12 days agobuild: tidy up `Makefile.inc` use in lib and src
Viktor Szakats [Sat, 21 Jun 2025 09:03:54 +0000 (11:03 +0200)] 
build: tidy up `Makefile.inc` use in lib and src

- cmake: use `CURL_RCFILES` instead of literal.
- cmake: use `LIB_RCFILES` instead of literal.
- cmake: fix comments.
- autotools: use `CURL_RCFILES` in `EXTRA_DIST`.
- autotools: use `LIB_RCFILES` in `EXTRA_DIST`.
- autotools: fix comments.
- autotools: fix indentation.

Closes #17694

12 days agoRELEASE-NOTES: synced rc-8_15_0-1
Daniel Stenberg [Sat, 21 Jun 2025 09:10:05 +0000 (11:10 +0200)] 
RELEASE-NOTES: synced

12 days agocurl: implement non-blocking STDIN read on Windows
DoI [Tue, 10 Jun 2025 11:13:35 +0000 (23:13 +1200)] 
curl: implement non-blocking STDIN read on Windows

Implements a seperate read thread for STDIN on Windows when curl is run
with -T/--upload-file .

This uses a similar technique to the nmap/ncat project, spawning a
seperate thread which creates a loop-back bound socket, sending STDIN
into this socket, and reading from the other end of said TCP socket in a
non-blocking way in the rest of curl.

Fixes #17451
Closes #17572

12 days agotop-complexity: lower max allowed complexity threshold to 90
Daniel Stenberg [Fri, 20 Jun 2025 21:31:33 +0000 (23:31 +0200)] 
top-complexity: lower max allowed complexity threshold to 90

Down from 100. Also make it show all functions with complexity > 65
(down from 70).

Closes #17689

12 days agolibssh: fix incorrect return value in myssh_in_AUTH_PKEY_INIT
Joel Depooter [Fri, 20 Jun 2025 22:44:02 +0000 (15:44 -0700)] 
libssh: fix incorrect return value in myssh_in_AUTH_PKEY_INIT

In the unlikely case that no SSH auth methods are supported, the
previous code would return 0 from myssh_in_AUTH_PKEY_INIT. However,
following the code path, it seems like it should be returning SSH_ERROR,
as set in myssh_to_ERROR (through myssh_to_GSSAPI_AUTH,
myssh_to_KEY_AUTH and myssh_to_PASSWD_AUTH).

In actuality, this is unlikely to occur, as the similar code in
myssh_in_AUTHLIST would have already returned an error in this scenario.
However setting a return value and then ignoring it is a bit fishy and
should be documented if this is intended.

I believe this used to return an error, but was changed in the recent
re-factoring of this code.

Closes #17691

12 days agotests: drop `BUNDLE_SRC` variable
Viktor Szakats [Sat, 21 Jun 2025 00:22:04 +0000 (02:22 +0200)] 
tests: drop `BUNDLE_SRC` variable

Derive it from `$BUNDLE` instead. autotools seems to be already relying
on `$BUNDLE_SRC` being equal to `$BUNDLE.c`. (I haven't realized this
before aaebb45f58b3f62876a68c17c71ac37d98f1b3bb.)

Also drop redundant `nodist_<target>_SOURCE` lines in tunits and units.

Follow-up to aaebb45f58b3f62876a68c17c71ac37d98f1b3bb #17688
Follow-up to 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590

Closes #17692

12 days agocmake: omit clang-tidy on internal libs curlu and curltool
Viktor Szakats [Sat, 21 Jun 2025 08:00:22 +0000 (10:00 +0200)] 
cmake: omit clang-tidy on internal libs curlu and curltool

Skip clang-tidy while compiling curlu and curltool internal libraries.
To save about 1 minute per run. These libraries compile the lib and src
sources a second time, with the `UNITTESTS` macro enabled, which makes
tiny difference, for internal use. I figure it's not worth the extra CI
(and local) time because finding extra issues in these passes is
unlikely, and if found, not critical.

autotools also doesn't check curlu and curltool with clang-tidy.

Ref: https://github.com/curl/curl/pull/17680#issuecomment-2991730158
Ref: https://stackoverflow.com/questions/61867616/ignore-certain-files-when-using-clang-tidy
Ref: https://cmake.org/cmake/help/latest/prop_tgt/LANG_CLANG_TIDY.html

Follow-up to fabfa8e4024473035b3e5c3c30c330be726d9bb4 #15825

Closes #17693

12 days agovtls: change send/recv signatures of tls backends
Stefan Eissing [Wed, 11 Jun 2025 12:50:15 +0000 (14:50 +0200)] 
vtls: change send/recv signatures of tls backends

Similar to connection filter changes, return a CURLcode and the
read/written amount as size_t *.

Closes #17593

12 days agodocs: fix broken link in CODE_REVIEW.md
Fabrício Canedo [Tue, 17 Jun 2025 18:51:57 +0000 (15:51 -0300)] 
docs: fix broken link in CODE_REVIEW.md

In CODE_REVIEW.md file, the link that points to CONTRIBUTE was broken,
so I fixed this issue changing the link from only "CONTRIBUTE.md" to
"https://curl.se/dev/contribute.html".

Closes #17656

12 days agodocs: fix broken link in INSTALL.md
Fabrício Canedo [Tue, 17 Jun 2025 17:46:23 +0000 (14:46 -0300)] 
docs: fix broken link in INSTALL.md

In INSTALL.md file, the link that points to CURL-DISABLE was broken,
so I fixed this issue changing the link from only "CURL-DISABLE.md" to
"https://github.com/curl/curl/blob/master/docs/CURL-DISABLE.md".

Fixes https://github.com/curl/curl-www/issues/427
Closes #17654

12 days agodocs: fix docs for CURLOPT_PREQUOTE after #17616
Ethan Alker [Fri, 20 Jun 2025 21:50:49 +0000 (17:50 -0400)] 
docs: fix docs for CURLOPT_PREQUOTE after #17616

Closes #17690

12 days agotests: make `Makefile.inc` files 80 columns
Daniel Stenberg [Sun, 15 Jun 2025 10:53:43 +0000 (12:53 +0200)] 
tests: make `Makefile.inc` files 80 columns

Since all code fits within that, it is more convenient.

Co-authored-by: Viktor Szakats
Follow-up to 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590

Closes #17623

12 days agoGHA: update rojopolis/spellcheck-github-actions digest to 35a02ba
renovate[bot] [Fri, 20 Jun 2025 19:55:50 +0000 (19:55 +0000)] 
GHA: update rojopolis/spellcheck-github-actions digest to 35a02ba

Closes #17686

12 days agoftplistparser: split parse_unix into sub functions
Daniel Stenberg [Thu, 12 Jun 2025 11:42:28 +0000 (13:42 +0200)] 
ftplistparser: split parse_unix into sub functions

Closes #17608

12 days agodocs: fix documentation of connect_only 2
Stefan Eissing [Mon, 16 Jun 2025 07:54:20 +0000 (09:54 +0200)] 
docs: fix documentation of connect_only 2

Setting CURLOPT_CONNECT_ONLY with value 2 is only defined
for WebSocket and the effect on other protocols is undetermined.
That includes the HTTP urls.

Fixes #17621
Reported-by: Kirill Obukhov
Closes #17635

12 days agoftp: fix prequotes for a directory in URL
Bartosz Ruszczak [Fri, 14 Mar 2025 20:53:42 +0000 (21:53 +0100)] 
ftp: fix prequotes for a directory in URL

Allow prequotes to be sent after curl has changed the working directory,
just before the listing command if the URL is a directory.

FTP state machine is updated with the new FTP_LIST_PREQUOTE state and
FTP_RETR_LIST_TYPE type.

Test 754 verifies

Fixes #8602
Closes #17616