]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years agoCI/cirrus: merge existing macOS jobs into a job matrix 9627/head
Marc Hoersken [Fri, 7 Oct 2022 20:04:55 +0000 (22:04 +0200)] 
CI/cirrus: merge existing macOS jobs into a job matrix

Ref: #9627
Reviewed-by: Philip H.
Closes #9672

2 years agostrcase: add and use Curl_timestrcmp
Daniel Stenberg [Wed, 5 Oct 2022 22:49:10 +0000 (00:49 +0200)] 
strcase: add and use Curl_timestrcmp

This is a strcmp() alternative function for comparing "secrets",
designed to take the same time no matter the content to not leak
match/non-match info to observers based on how fast it is.

The time this function takes is only a function of the shortest input
string.

Reported-by: Trail of Bits
Closes #9658

2 years agotool_getparam: split out data_urlencode() into its own function
Daniel Stenberg [Fri, 7 Oct 2022 22:25:45 +0000 (00:25 +0200)] 
tool_getparam: split out data_urlencode() into its own function

Closes #9673

2 years agoconnect: fix Curl_updateconninfo for TRNSPRT_UNIX
Daniel Stenberg [Fri, 7 Oct 2022 16:10:05 +0000 (18:10 +0200)] 
connect: fix Curl_updateconninfo for TRNSPRT_UNIX

Reported-by: Vasiliy Ulyanov
Fixes #9664
Closes #9670

2 years agows: fix Coverity complaints
Daniel Stenberg [Fri, 7 Oct 2022 12:07:46 +0000 (14:07 +0200)] 
ws: fix Coverity complaints

Coverity pointed out several flaws where variables remained
uninitialized after forks.

Follow-up to e3f335148adc6742728f

Closes #9666

2 years agoCI/GHA: merge msh3 and openssl3 builds into linux workflow
Marc Hoersken [Tue, 4 Oct 2022 20:30:33 +0000 (22:30 +0200)] 
CI/GHA: merge msh3 and openssl3 builds into linux workflow

Continue work on merging all Linux workflows into one file.

Follow up to #9501
Closes #9646

2 years agocurl_ws_send.3: call the argument 'fragsize'
Daniel Stenberg [Fri, 7 Oct 2022 15:33:44 +0000 (17:33 +0200)] 
curl_ws_send.3: call the argument 'fragsize'

Since WebSocket works with "fragments" not "frames"

Closes #9668

2 years agoeasy: avoid Intel error #2312: pointer cast involving 64-bit pointed-to type
Daniel Stenberg [Fri, 7 Oct 2022 15:50:37 +0000 (17:50 +0200)] 
easy: avoid Intel error #2312: pointer cast involving 64-bit pointed-to type

Follow-up to e3f335148adc6742728ff8

Closes #9669

2 years agotool_main: exit at once if out of file descriptors
Daniel Stenberg [Wed, 5 Oct 2022 08:33:07 +0000 (10:33 +0200)] 
tool_main: exit at once if out of file descriptors

If the main_checkfds function cannot create new file descriptors in an
attempt to detect of stdin, stdout or stderr are closed.

Also changed the check to use fcntl() to check if the descriptors are
open, which avoids superfluously calling pipe() if they all already are.

Follow-up to facfa19cdd4d0094

Reported-by: Trail of Bits
Closes #9663

2 years agowebsockets: remodeled API to support 63 bit frame sizes
Daniel Stenberg [Mon, 3 Oct 2022 15:40:02 +0000 (17:40 +0200)] 
websockets: remodeled API to support 63 bit frame sizes

curl_ws_recv() now receives data to fill up the provided buffer, but can
return a partial fragment. The function now also get a pointer to a
curl_ws_frame struct with metadata that also mentions the offset and
total size of the fragment (of which you might be receiving a smaller
piece). This way, large incoming fragments will be "streamed" to the
application. When the curl_ws_frame struct field 'bytesleft' is 0, the
final fragment piece has been delivered.

curl_ws_recv() was also adjusted to work with a buffer size smaller than
the fragment size. (Possibly needless to say as the fragment size can
now be 63 bit large).

curl_ws_send() now supports sending a piece of a fragment, in a
streaming manner, in addition to sending the entire fragment in a single
call if it is small enough. To send a huge fragment, curl_ws_send() can
be used to send it in many small calls by first telling libcurl about
the total expected fragment size, and then send the payload in N number
of separate invokes and libcurl will stream those over the wire.

The struct curl_ws_meta() returns is now called 'curl_ws_frame' and it
has been extended with two new fields: *offset* and *bytesleft*. To help
describe the passed on data chunk when a fragment is delivered in many
smaller pieces.

The documentation has been updated accordingly.

Closes #9636

2 years agodocs/examples: avoid deprecated options in examples where possible
Patrick Monnerat [Thu, 6 Oct 2022 23:43:21 +0000 (01:43 +0200)] 
docs/examples: avoid deprecated options in examples where possible

Example programs targeting a deprecated feature/option are commented with
a warning about it.
Other examples are adapted to not use deprecated options.

Closes #9661

2 years agocmake: fix enabling websocket support
Viktor Szakats [Thu, 6 Oct 2022 21:34:37 +0000 (21:34 +0000)] 
cmake: fix enabling websocket support

Follow-up from 664249d095275ec532f55dd1752d80c8c1093a77

Closes #9660

2 years agotidy-up: delete parallel/unused feature flags
Viktor Szakats [Thu, 6 Oct 2022 15:30:13 +0000 (15:30 +0000)] 
tidy-up: delete parallel/unused feature flags

Detecting headers and lib separately makes sense when headers come in
variations or with extra ones, but this wasn't the case here. These were
duplicate/parallel macros that we had to keep in sync with each other
for a working build. This patch leaves a single macro for each of these
dependencies:

- Rely on `HAVE_LIBZ`, delete parallel `HAVE_ZLIB_H`.

  Also delete CMake logic making sure these two were in sync, along with
  a toggle to turn off that logic, called `CURL_SPECIAL_LIBZ`.

  Also delete stray `HAVE_ZLIB` defines.

  There is also a `USE_ZLIB` variant in `lib/config-dos.h`. This patch
  retains it for compatibility and deprecates it.

- Rely on `USE_LIBSSH2`, delete parallel `HAVE_LIBSSH2_H`.

  Also delete `LIBSSH2_WIN32`, `LIBSSH2_LIBRARY` from
  `winbuild/MakefileBuild.vc`, these have a role when building libssh2
  itself. And `CURL_USE_LIBSSH`, which had no use at all.

  Also delete stray `HAVE_LIBSSH2` defines.

- Rely on `USE_LIBSSH`, delete parallel `HAVE_LIBSSH_LIBSSH_H`.

  Also delete `LIBSSH_WIN32`, `LIBSSH_LIBRARY` and `HAVE_LIBSSH` from
  `winbuild/MakefileBuild.vc`, these were the result of copy-pasting the
  libssh2 line, and were not having any use.

- Delete unused `HAVE_LIBPSL_H` and `HAVE_LIBPSL`.

Reviewed-by: Daniel Stenberg
Closes #9652

2 years agonetrc: compare user name case sensitively
Daniel Stenberg [Thu, 6 Oct 2022 07:16:42 +0000 (09:16 +0200)] 
netrc: compare user name case sensitively

User name comparisions in netrc need to match the case.

Closes #9657

2 years agoCURLOPT_COOKIEFILE: insist on "" for enable-without-file
Daniel Stenberg [Wed, 5 Oct 2022 22:52:35 +0000 (00:52 +0200)] 
CURLOPT_COOKIEFILE: insist on "" for enable-without-file

The former way that also suggested using a non-existing file to just
enable the cookie engine could lead to developers maybe a bit carelessly
guessing a file name that will not exist, and then in a future due to
circumstances, such a file could be made to exist and then accidentally
libcurl would read cookies not actually meant to.

Reported-by: Trail of bits
Closes #9654

2 years agotests/Makefile: remove run time stats from ci-test
Daniel Stenberg [Thu, 6 Oct 2022 07:07:03 +0000 (09:07 +0200)] 
tests/Makefile: remove run time stats from ci-test

The ci-test is the normal makefile target invoked in CI jobs. This has
been using the -r option to runtests.pl since a long time, but I find
that it mostly just adds many lines to the test output report without
anyone caring much about those stats.

Remove it.

Closes #9656

2 years agotool: reorganize function c_escape around a dynbuf
Patrick Monnerat [Wed, 5 Oct 2022 16:51:16 +0000 (18:51 +0200)] 
tool: reorganize function c_escape around a dynbuf

This is a bit shorter and a lot safer.

Substrings of unescaped characters are added by a single call to reduce
overhead.

Extend test 1465 to handle more kind of escapes.

Closes #9653

2 years agoCURLOPT_HTTPPOST.3: bolden the deprecation notice
Jay Satiro [Mon, 3 Oct 2022 18:00:19 +0000 (14:00 -0400)] 
CURLOPT_HTTPPOST.3: bolden the deprecation notice

Ref: https://github.com/curl/curl/pull/9621

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

2 years agomisc: fix spelling in docs and comments
John Bampton [Tue, 4 Oct 2022 15:40:54 +0000 (01:40 +1000)] 
misc: fix spelling in docs and comments

also: remove outdated sentence

Closes #9644

2 years agotool: avoid generating ambiguous escaped characters in --libcurl
Patrick Monnerat [Tue, 4 Oct 2022 14:50:45 +0000 (16:50 +0200)] 
tool: avoid generating ambiguous escaped characters in --libcurl

C string hexadecimal-escaped characters may have more than 2 digits.
This results in a wrong C compiler interpretation of a 2-digit escaped
character when followed by an hex digit character.

The solution retained here is to represent such characters as 3-digit
octal escapes.

Adjust and extend test 1465 for this case.

Closes #9643

2 years agoconfigure: the ngtcp2 option should default to 'no'
Daniel Stenberg [Wed, 5 Oct 2022 08:30:04 +0000 (10:30 +0200)] 
configure: the ngtcp2 option should default to 'no'

While still experimental.

Bug: https://curl.se/mail/lib-2022-10/0007.html
Reported-by: Daniel Hallberg
Closes #9650

2 years agoCURLOPT_MIMEPOST.3: add an (inline) example
Daniel Stenberg [Wed, 5 Oct 2022 08:02:13 +0000 (10:02 +0200)] 
CURLOPT_MIMEPOST.3: add an (inline) example

Reported-by: Jay Satiro
Bug: https://github.com/curl/curl/pull/9637#issuecomment-1268070723

Closes #9649

2 years agoMakefile.m32: exclude libs & libpaths for shared mode exes [ci skip]
Viktor Szakats [Wed, 5 Oct 2022 13:56:31 +0000 (13:56 +0000)] 
Makefile.m32: exclude libs & libpaths for shared mode exes [ci skip]

Exclude linker flags specifying depedency libs and libpaths, when
building against `libcurl.dll`. In such case these options are not
necessary (but may cause errors if not/wrongly configured.)

Also move and reword a comment on `CPPFLAGS` to not apply to
`UNICODE` options. These are necessary for all build targets.

Closes #9651

2 years agoruntests: fix uninitialized value on ignored tests
Jay Satiro [Wed, 5 Oct 2022 07:33:39 +0000 (03:33 -0400)] 
runtests: fix uninitialized value on ignored tests

- Don't show TESTFAIL message (ie tests failed which aren't ignored) if
  only ignored tests failed.

Before:
IGNORED: failed tests: 571 612 1056
TESTDONE: 1214 tests out of 1217 reported OK: 99%
Use of uninitialized value $failed in concatenation (.) or string at
./runtests.pl line 6290.
TESTFAIL: These test cases failed:

After:
IGNORED: failed tests: 571 612 1056
TESTDONE: 1214 tests out of 1217 reported OK: 99%

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

2 years agocirrus: use make LDFLAGS=-all-static instead of curl_LDFLAGS
Jay Satiro [Sun, 2 Oct 2022 21:21:28 +0000 (17:21 -0400)] 
cirrus: use make LDFLAGS=-all-static instead of curl_LDFLAGS

- Correct the use of -all-static for static Windows CI builds.

curl_LDFLAGS was removed from the makefile when metalink support was
removed. LDFLAGS=-all-static is passed to make only, because it is not a
valid option for configure compilation tests.

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

2 years agoMakefile.m32: fix regression with tool_hugehelp [ci skip]
Viktor Szakats [Tue, 4 Oct 2022 19:14:38 +0000 (19:14 +0000)] 
Makefile.m32: fix regression with tool_hugehelp [ci skip]

In a recent commit I mistakenly deleted this logic, after seeing a
reference to a filename ending with `.cvs` and thinking it must have
been long gone. Turns out this is an existing file. Restore the rule
and the necessary `COPY` definitions with it.

The restored logic is required for a successful build on a bare source
tree (as opposed to a source release tarball).

Also shorten an existing condition similar to the one added in this
patch.

Regression since 07a0047882dd3f1fbf73486c5dd9c15370877ad6

Closes #9645

2 years agoMakefile.m32: deduplicate build rules [ci skip]
Viktor Szakats [Tue, 4 Oct 2022 17:09:51 +0000 (17:09 +0000)] 
Makefile.m32: deduplicate build rules [ci skip]

After this patch, we reduce the three copies of most `Makefile.m32`
logic to one. This now resides in `lib/Makefile.m32`. It makes future
updates easier, the code shorter, with a small amount of added
complexity.

`Makefile.m32` reduction:

|                   |  bytes | LOC total |  blank |  comment |  code |
|-------------------|-------:|----------:|-------:|---------:|------:|
| 7.85.0            |  34772 |      1337 |     79 |      192 |  1066 |
| before this patch |  17601 |       625 |     62 |      106 |   457 |
| after this patch  |  11680 |       392 |     52 |      104 |   236 |

Details:

- Change rules to create objects for the `v*` subdirs in the `lib` dir.
  This allows to use a shared compile rule and assumes that filenames
  are not (and will not be) colliding across these directories.
  `Makefile.m32` now also stores a list of these subdirs. They are
  changing rarely though.

- Sync as much as possible between the three `Makefile.m32` scripts'
  rules and their source/target sections.

- After this patch `CPPFLAGS` are all applied to the `src` sources once
  again. This matches the behaviour of cmake/autotools. Only zlib ones
  are actually required there.

- Use `.rc` names from `Makefile.inc` instead of keeping a duplicate.

- Change examples to link `libcurl.dll` by default. This makes building
  trivial, even as a cross-build:
    `CC=x86_64-w64-mingw32-gcc make -f Makefile.m32`
  To run them, you need to move/copy or add-to-path `libcurl.dll`.
  You can select static mode via `CFG=-static`.

- List more of the `Makefile.m32` config variables.

- Drop `.rc` support from examples. It made it fragile without much
  benefit.

- Include a necessary system lib for the `externalsocket.c` example.

- Exclude unnecessary systems libs when building in `-dyn` mode.

Closes #9642

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 4 Oct 2022 14:24:19 +0000 (16:24 +0200)] 
RELEASE-NOTES: synced

2 years agoCURLOPT_COOKIELIST.3: fix formatting mistake
Daniel Stenberg [Tue, 4 Oct 2022 07:23:21 +0000 (09:23 +0200)] 
CURLOPT_COOKIELIST.3: fix formatting mistake

Also, updated manpage-syntax.pl to make it detect this error in test
1173.

Reported-by: ProceduralMan on github
Fixes #9639
Closes #9640

2 years agoconnect: change verbose IPv6 address:port to [address]:port
Jay Satiro [Mon, 3 Oct 2022 07:29:32 +0000 (03:29 -0400)] 
connect: change verbose IPv6 address:port to [address]:port

- Use brackets for the IPv6 address shown in verbose message when the
  format is address:port so that it is less confusing.

Before: Trying 2606:4700:4700::1111:443...
After: Trying [2606:4700:4700::1111]:443...

Bug: https://curl.se/mail/archive-2022-02/0041.html
Reported-by: David Hu
Closes #9635

2 years agoMakefile.m32: major rework [ci skip]
Viktor Szakats [Mon, 3 Oct 2022 19:46:56 +0000 (19:46 +0000)] 
Makefile.m32: major rework [ci skip]

This patch overhauls `Makefile.m32` scripts, fixing a list of quirks,
making its behaviour and customization envvars align better with other
build systems, aiming for less code, that is easier to read, use and
maintain.

Details:
- Rename customization envvars:
  `CURL_CC` -> `CC`
  `CURL_RC` -> `RC`
  `CURL_AR` -> `AR`
  `CURL_LDFLAG_EXTRAS_DLL` -> `CURL_LDFLAGS_LIB`
  `CURL_LDFLAG_EXTRAS_EXE` -> `CURL_LDFLAGS_BIN`
- Drop `CURL_STRIP` and `CURL_RANLIB`. These tools are no longer used.
- Accept `CFLAGS`, `CPPFLAGS`, `RCFLAGS`, `LDFLAGS` and `LIBS` envvars.
- Drop `CURL_CFLAG_EXTRAS`, `CURL_LDFLAG_EXTRAS`, `CURL_RCFLAG_EXTRAS` in
  favor of the above.
- Do not automatically enable `zlib` with `libssh2`. `zlib` is optional
  with `libssh2`.
- Omit unnecessary `CPPFLAGS` options when building `curl.exe` and
  examples.
- Drop support for deprecated `-winssl` `CFG` option. Use `-schannel`
  instead.
- Avoid late evaluation where not necessary (`=` -> `:=`).
- Drop support for `CURL_DLL_A_SUFFIX` to override the implib suffix.
  Instead, use the standard naming scheme by default: `libcurl.dll.a`.
  The toolchain recognizes the name, and selects it automatically when
  asking for a `-shared` vs. `-static` build.
- Stop applying `strip` to `libcurl.a`. Follow-up from
  16a58e9f93c7e89e1f87720199388bcfcfa148a4. There was no debug info to
  strip since then.
- Stop setting `-O3`, `-W`, `-Wall` options. You can add these to
  `CFLAGS` as desired.
- Always enable `-DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG` with OpenSSL,
  to avoid that vulnerability on Windows.
- Add `-lbrotlicommon` to `LIBS` when using `brotli`.
- Do not enable `-nghttp3` without `-ngtcp2`.
- `-ssh2` and `-rtmp` options no longer try to auto-select a TLS-backend.
  You need to set the backend explicitly. This scales better and avoids
  issues with certain combinations (e.g. `libssh2` + `wolfssl` with no
  `schannel`).
- Default to OpenSSL TLS-backend with `ngtcp2`. Possible to override via
  `NGTCP2_LIBS`.
- Old, alternate method of enabling components (e.g. `SSH2=1`) no longer
  supported.
- Delete `SPNEGO` references. They were no-ops.
- Drop support for Win9x environments.
- Allow setting `OPENSSL_LIBS` independently from `OPENSSL_LIBPATH`.
- Support autotools/CMake `libssh2` builds by default.
- Respect `CURL_DLL_SUFFIX` in `-dyn` mode when building `curl.exe` and
  examples.
- Assume standard directory layout with `LIBCARES_PATH`. (Instead of the
  long gone embedded one.)
- Stop static linking with c-ares by default. Add
  `CPPFLAGS=-DCARES_STATICLIB` to enable it.
- Reorganize internal layout to avoid redundancy and emit clean diffs
  between src/lib and example make files.
- Delete unused variables.
- Code cleanups/rework.
- Comment and indentation fixes.

Closes #9632

2 years agoscripts/release-notes.pl: strip ci skip tag [ci skip]
Viktor Szakats [Sun, 2 Oct 2022 22:15:21 +0000 (22:15 +0000)] 
scripts/release-notes.pl: strip ci skip tag [ci skip]

Ref: https://github.com/curl/curl/commit/e604a82cae922bf86403a94f5803ac5e4303ae97#commitcomment-85637701

Reviewed-by: Daniel Stenberg
Closes #9634

2 years agoMakefile.m32: delete legacy component bits [ci skip]
Viktor Szakats [Sun, 2 Oct 2022 09:34:13 +0000 (09:34 +0000)] 
Makefile.m32: delete legacy component bits [ci skip]

- Drop auto-detection of OpenSSL 1.0.2 and earlier. Now always defaulting
  to OpenSSL 1.1.0 and later, LibreSSL and BoringSSL.

- Drop `Invalid path to OpenSSL package` detection. OpenSSL has been
  using a standard file layout since 1.1.0, so this seems unnecessary
  now.

- Drop special logic to enable Novell LDAP SDK support.

- Drop special logic to enable OpenLDAP LDAP SDK support. This seems
  to be distinct from native OpenLDAP, with support implemented inside
  `lib/ldap.c` (vs. `lib/openldap.c`) back when the latter did not exist
  yet in curl.

- Add `-lwldap32` only if there is no other LDAP library (either native
  OpenLDAP, or SDKs above) present.

- Update `doc/INSTALL.md` accordingly.

After this patch, it's necessary to make configration changes when using
OpenSSL 1.0.2 or earlier, or the two LDAP SDKs.

OpenSSL 1.0.2 and earlier:
```
export OPENSSL_INCLUDE = <path-to-openssl>/outinc
export OPENSSL_LIBPATH = <path-to-openssl>/out
export OPENSSL_LIBS = -lssl32 -leay32 -lgdi32
```

Novell LDAP SDK, previously enabled via `USE_LDAP_NOVELL=1`:
```
export CURL_CFLAG_EXTRAS = -I<path-to-sdk>/inc -DCURL_HAS_NOVELL_LDAPSDK
export CURL_LDFLAG_EXTRAS = -L<path-to-sdk>/lib/mscvc -lldapsdk -lldapssl -lldapx
```

OpenLDAP LDAP SDK, previously enabled via `USE_LDAP_OPENLDAP=1`:
```
export CURL_CFLAG_EXTRAS = -I<path-to-sdk>/include -DCURL_HAS_OPENLDAP_LDAPSDK
export CURL_LDFLAG_EXTRAS = -L<path-to-sdk>/lib -lldap -llber
```

I haven't tested these scenarios, and in general we recommend using
a recent OpenSSL release. Also, WinLDAP (the Windows default) and
OpenLDAP (via `-DUSE_OPENLDAP`) are the LDAP options actively worked on
in curl.

Closes #9631

2 years agovauth/ntlm.h: make line shorter than 80 columns
Daniel Stenberg [Sat, 1 Oct 2022 22:21:18 +0000 (00:21 +0200)] 
vauth/ntlm.h: make line shorter than 80 columns

Follow-up from 265fbd937

2 years agodocs: update sourceforge project links [ci skip]
Viktor Szakats [Sat, 1 Oct 2022 18:23:09 +0000 (18:23 +0000)] 
docs: update sourceforge project links [ci skip]

SourceForge projects can now choose between two hostnames, with .io and
.net ending. Both support HTTPS by default now. Opening the other variant
will perm-redirected to the one chosen by the project.

The .io -> .net redirection is done insecurely.

Let's update the URLs to point to the current canonical endpoints to
avoid any redirects.

Closes #9630

2 years agocurl_url_set.3: document CURLU_APPENDQUERY proper
Daniel Stenberg [Fri, 30 Sep 2022 21:41:18 +0000 (23:41 +0200)] 
curl_url_set.3: document CURLU_APPENDQUERY proper

Listed among the other supported flags.

Reported-by: Robby Simpson
Fixes #9628
Closes #9629

2 years agoMakefile.m32: cleanups and fixes [ci skip]
Viktor Szakats [Sat, 1 Oct 2022 10:07:34 +0000 (10:07 +0000)] 
Makefile.m32: cleanups and fixes [ci skip]

- Add `-lcrypt32` once, and add it always for simplicity.
- Delete broken link and reference to the pre-Vista WinIDN add-on.
  MS no longer distribute it.
- Delete related `WINIDN_PATH` option. IDN is a system lib since Vista.
- Sync `LIBCARES_PATH` default with the rest of dependencies.
- Delete version numbers from dependency path defaults.
- `libgsasl` package is now called `gsasl`.
- Delete `libexpat` and `libxml2` references. No longer used by curl.
- Delete `Edit the path below...` comments. We recommend to predefine
  those envvars instead.
- `libcares.a` is not an internal dependency anymore. Stop using it as
  such.
- `windres` `--include-dir` -> `-I`, `-F` -> `--target=` for readability.
- Delete `STRIP`, `CURL_STRIP`, `AR` references from `src/Makefile.m32`.
  They were never used.
- Stop to `clean` some objects twice in `src/Makefile.m32`.
- Delete cvs-specific leftovers.
- Finish resource support in examples make file.
- Delete `-I<root>/lib` from examples make file.
- Fix copyright start year in examples make file.
- Delete duplicate `ftpuploadresume` input in examples make file.
- Sync OpenSSL lib order, `SYNC` support, `PROOT` use, dependency path
  defaults, variables names and other internal bits between the three
  make files.
- `lib/Makefile.m32` accepted custom options via `DLL_LIBS` envvar. This
  was lib-specific and possibly accidental. Use `CURL_LDFLAG_EXTRAS_DLL`
  envvar for the same effect.
- Fix linking `curl.exe` and examples to wrong static libs with
  auto-detected OpenSSL 1.0.2 or earlier.
- Add `-lgdi32` for OpenSSL 1.0.2 and earlier only.
- Add link to Novell LDAP SDK and use a relative default path. Latest
  version is from 2016, linked to an outdated OpenSSL 1.0.1.
- Whitespace and comment cleanups.

TODO in a next commit:

Delete built-in detection/logic for OpenSSL 1.0.2 and earlier, the Novell
LDAP SDK and the other LDAP SDK (which is _not_ OpenLDAP). Write up the
necessary custom envvars to configure them.

Closes #9616

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 30 Sep 2022 08:46:12 +0000 (10:46 +0200)] 
RELEASE-NOTES: synced

2 years agoHTTP3.md: update Caddy example
Matt Holt [Thu, 29 Sep 2022 18:42:00 +0000 (12:42 -0600)] 
HTTP3.md: update Caddy example

Closes #9623

2 years agoeasy: fix the altsvc init for curl_easy_duphandle
Daniel Stenberg [Thu, 29 Sep 2022 20:50:45 +0000 (22:50 +0200)] 
easy: fix the altsvc init for curl_easy_duphandle

It was using the old #ifdef which nothing sets anymore

Closes #9624

2 years agoGHA: build tests in a separate step from the running of them
Daniel Stenberg [Thu, 29 Sep 2022 10:26:04 +0000 (12:26 +0200)] 
GHA: build tests in a separate step from the running of them

... to make the output smaller for when you want to look at test
failures.

Removed the examples build from msh3

Closes #9619

2 years agoldap: delete stray CURL_HAS_MOZILLA_LDAP reference
Viktor Szakats [Thu, 29 Sep 2022 21:29:53 +0000 (21:29 +0000)] 
ldap: delete stray CURL_HAS_MOZILLA_LDAP reference

Added in 68b215157fdf69612edebdb220b3804822277822, while adding openldap
support. This is also the single mention of this constant in the source
tree and also in that commit. Based on these, it seems like an accident.

Delete this reference.

Reviewed-by: Daniel Stenberg
Closes #9625

2 years agodocs: spelling nits
Viktor Szakats [Thu, 29 Sep 2022 21:29:04 +0000 (21:29 +0000)] 
docs: spelling nits

- MingW -> MinGW (Minimalist GNU for Windows)
- f.e. -> e.g.
- some whitespace and punctuation.

Reviewed-by: Daniel Stenberg
Closes #9622

2 years agocirrus-ci: add macOS build with m1
Philip H [Wed, 21 Sep 2022 18:46:33 +0000 (20:46 +0200)] 
cirrus-ci: add macOS build with m1

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

2 years agolib: sanitize conditional exclusion around MIME
Patrick Monnerat [Wed, 28 Sep 2022 16:12:15 +0000 (18:12 +0200)] 
lib: sanitize conditional exclusion around MIME

The introduction of CURL_DISABLE_MIME came with some additional bugs:
- Disabled MIME is compiled-in anyway if SMTP and/or IMAP is enabled.
- CURLOPT_MIMEPOST, CURLOPT_MIME_OPTIONS and CURLOPT_HTTPHEADER are
  conditioned on HTTP, although also needed for SMTP and IMAP MIME mail
  uploads.

In addition, the CURLOPT_HTTPHEADER and --header documentation does not
mention their use for MIME mail.

This commit fixes the problems above.

Closes #9610

2 years agodocs: minor grammar fixes
Thiago Suchorski [Tue, 27 Sep 2022 16:53:54 +0000 (13:53 -0300)] 
docs: minor grammar fixes

Closes #9609

2 years agoCURLSHOPT_UNLOCKFUNC.3: the callback as no 'access' argument
Daniel Stenberg [Wed, 28 Sep 2022 13:44:23 +0000 (15:44 +0200)] 
CURLSHOPT_UNLOCKFUNC.3: the callback as no 'access' argument

Probably a copy and paste error from the lock function man page.

Reported-by: Robby Simpson
Fixes #9612
Closes #9613

2 years agoCURLOPT_ACCEPT_ENCODING.3: remove "four" as they are five
Daniel Stenberg [Wed, 28 Sep 2022 14:10:46 +0000 (16:10 +0200)] 
CURLOPT_ACCEPT_ENCODING.3: remove "four" as they are five

... instead just list the supported encodings.

Reported-by: ProceduralMan on github
Fixes #9614
Closes #9615

2 years agotests: Remove a duplicated keyword
Dan Fandrich [Wed, 28 Sep 2022 17:57:10 +0000 (10:57 -0700)] 
tests: Remove a duplicated keyword

2 years agodocs: document more server names for test files
Dan Fandrich [Wed, 28 Sep 2022 17:56:31 +0000 (10:56 -0700)] 
docs: document more server names for test files

2 years agoaltsvc: reject bad port numbers
Daniel Stenberg [Tue, 27 Sep 2022 15:20:23 +0000 (17:20 +0200)] 
altsvc: reject bad port numbers

The existing code tried but did not properly reject alternative services
using negative or too large port numbers.

With this fix, the logic now also flushes the old entries immediately
before adding a new one, making a following header with an illegal entry
not flush the already stored entry.

Report from the ongoing source code audit by Trail of Bits.

Adjusted test 356 to verify.

Closes #9607

2 years agofunctypes: provide the recv and send arg and return types
Daniel Stenberg [Mon, 26 Sep 2022 09:45:18 +0000 (11:45 +0200)] 
functypes: provide the recv and send arg and return types

This header is for providing the argument types for recv() and send()
when built to not use a dedicated config-[platfor].h file.

Remove the slow brute-force checks from configure and cmake.

This change also removes the use of the types for select, as they were
not used in code.

Closes #9592

2 years agourlapi: reject more bad characters from the host name field
Daniel Stenberg [Tue, 27 Sep 2022 15:48:08 +0000 (17:48 +0200)] 
urlapi: reject more bad characters from the host name field

Extended test 1560 to verify

Report from the ongoing source code audit by Trail of Bits.

Closes #9608

2 years agoconfigure: deprecate builds with small curl_off_t
Daniel Stenberg [Tue, 27 Sep 2022 09:13:21 +0000 (11:13 +0200)] 
configure: deprecate builds with small curl_off_t

If curl_off_t turns out to be smaller than 8 bytes,
--with-n64-deprecated needs to be used to allow the build to
continue. This is to highlight the fact that support for such builds is
going away next year.

Also mentioned in DEPRECATED.md

Closes #9605

2 years agohttp, vauth: always provide Curl_allow_auth_to_host() functionality
Patrick Monnerat [Mon, 26 Sep 2022 23:01:16 +0000 (01:01 +0200)] 
http, vauth: always provide Curl_allow_auth_to_host() functionality

This function is currently located in the lib/http.c module and is
therefore disabled by the CURL_DISABLE_HTTP conditional token.

As it may be called by TLS backends, disabling HTTP results in an
undefined reference error at link time.

Move this function to vauth/vauth.c to always provide it and rename it
as Curl_auth_allowed_to_host() to respect the vauth module naming
convention.

Closes #9600

2 years agongtcp2: fix C89 compliance nit
Daniel Stenberg [Tue, 27 Sep 2022 07:06:37 +0000 (09:06 +0200)] 
ngtcp2: fix C89 compliance nit

2 years agoopenssl: make certinfo available for QUIC
Daniel Stenberg [Mon, 26 Sep 2022 14:19:50 +0000 (16:19 +0200)] 
openssl: make certinfo available for QUIC

Curl_ossl_certchain() is now an exported function in lib/vtls/openssl.c that
can also be used from quiche.c and ngtcp2.c to get the cert chain for QUIC
connections as well.

The *certchain function was moved to the top of the file for this reason.

Reported-by: Eloy Degen
Fixes #9584
Closes #9597

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 27 Sep 2022 11:09:44 +0000 (13:09 +0200)] 
RELEASE-NOTES: synced

2 years agoDEPRECATE.md: Support for systems without 64 bit data types
Daniel Stenberg [Tue, 27 Sep 2022 08:42:36 +0000 (10:42 +0200)] 
DEPRECATE.md: Support for systems without 64 bit data types

Closes #9604

2 years agotests: skip mime/form tests when mime is not built-in
Patrick Monnerat [Mon, 26 Sep 2022 13:38:41 +0000 (15:38 +0200)] 
tests: skip mime/form tests when mime is not built-in

Closes #9596

2 years agourl: rename function due to name-clash in Watt-32
Daniel Stenberg [Tue, 27 Sep 2022 07:32:20 +0000 (09:32 +0200)] 
url: rename function due to name-clash in Watt-32

Follow-up to 2481dbe5f4f58 and applies the change the way it was
intended.

2 years agowindows: adjust name of two internal public functions
Viktor Szakats [Mon, 26 Sep 2022 22:31:09 +0000 (22:31 +0000)] 
windows: adjust name of two internal public functions

According to `docs/INTERNALS.md`, internal function names spanning source
files start with uppercase `Curl_`. Bring these two functions in
alignment with this.

This also stops exporting them from `libcurl.dll` in autotools builds.

Reviewed-by: Daniel Stenberg
Closes #9598

2 years agourl: rename function due to name-clash in Watt-32
Gisle Vanem [Sat, 24 Sep 2022 18:58:09 +0000 (20:58 +0200)] 
url: rename function due to name-clash in Watt-32

Since the commit 764c958c52edb427f39, there was a new function called
resolve_ip(). This clashes with an internal function in Watt-32.

Closes #9585

2 years agoschannel: ban server ALPN change during recv renegotiation
Jay Satiro [Fri, 9 Sep 2022 19:33:47 +0000 (15:33 -0400)] 
schannel: ban server ALPN change during recv renegotiation

By the time schannel_recv is renegotiating the connection, libcurl has
already decided on a protocol and it is too late for the server to
select a protocol via ALPN except for the originally selected protocol.

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

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

2 years agourl: a zero-length userinfo part in the URL is still a (blank) user
Daniel Stenberg [Sun, 25 Sep 2022 09:17:04 +0000 (11:17 +0200)] 
url: a zero-length userinfo part in the URL is still a (blank) user

Adjusted test 1560 to verify

Reported-by: Jay Satiro
Fixes #9088
Closes #9590

2 years agoautotools: allow --enable-symbol-hiding with windows
Viktor Szakats [Sun, 25 Sep 2022 22:19:13 +0000 (22:19 +0000)] 
autotools: allow --enable-symbol-hiding with windows

This local autotools logic was put in place in
9e24b9c7afbcb81120af4cf3f6cdee49a06d8224 (in 2012) which disabled it for
Windows unconditionally. Testing reveals that it actually works with
tested toolchains (mingw-w64 and CI ones), so let's allow this build
feature on that platform. Bringing this in sync with CMake, which already
supported this.

Reviewed-by: Jay Satiro
Closes #9586

2 years agoautotools: reduce brute-force when detecting recv/send arg list
Viktor Szakats [Sun, 25 Sep 2022 21:58:21 +0000 (21:58 +0000)] 
autotools: reduce brute-force when detecting recv/send arg list

autotools uses brute-force to detect `recv`/`send`/`select` argument
lists, by interating through _all_ argument type combinations on each
`./configure` run. This logic exists since
01fa02d0b545e1433dced2430561f8c0c72b74a9 (from 2006) and was a bit later
extended with Windows support.

This results in a worst-case number of compile + link cycles as below:
- `recv`: 96
- `send`: 192
- `select`: 60
Total: 348 (the number of curl C source files is 195, for comparison)

Notice that e.g. curl-for-win autotools builds require two `./configure`
invocations, doubling these numbers.

`recv` on Windows was especially unlucky because `SOCKET` (the correct
choice there) was listed _last_ in one of the outer trial loops. This
resulted in lengthy waits while autotools was trying all invalid
combinations first, wasting cycles, disk writes and slowing down
iteration.

This patch reduces the amount of idle work by reordering the tests in
a way to succeed first on a well-known platform such as Windows, and
also on non-Windows by testing for POSIX prototypes first, on the
assumption that these are the most likely candidates these days. (We do
not touch `select`, where the order was already optimal for these
platforms.)

For non-Windows, this means to try a return value of `ssize_t` first,
then `int`, reordering the buffer argument type to try `void *` first,
then `byte *`, and prefer the `const` flavor with `send`. If we are
here, also stop testing for `SOCKET` type in non-Windows builds.

After the patch, detection on Windows is instantaneous. It should also be
faster on popular platforms such as Linux and BSD-based ones.

If there are known-good variations for other platforms, they can also be
fast-tracked like above, given a way to check for that platform inside
the autotools logic.

Reviewed-by: Daniel Stenberg
Closes #9591

2 years agoTODO: Provide the error body from a CONNECT response
Daniel Stenberg [Fri, 23 Sep 2022 12:10:10 +0000 (14:10 +0200)] 
TODO: Provide the error body from a CONNECT response

Spellchecked-by: Jay Satiro
Closes #9513
Closes #9581

2 years agowindows: autotools .rc warnings fixup
Viktor Szakats [Fri, 23 Sep 2022 19:39:18 +0000 (19:39 +0000)] 
windows: autotools .rc warnings fixup

Move `LT_LANG([Windows Resource])` after `XC_LIBTOOL`, fixing:

- Warnings when running `autoreconf -fi`.

- Warning when compiling .rc files:
  libtool: compile: unable to infer tagged configuration
  libtool:   error: specify a tag with '--tag'

Follow up to 6de7322c03d5b4d91576a7d9fc893e03cc9d1057
Ref: https://github.com/curl/curl/pull/9521#issuecomment-1256291156

Suggested-by: Patrick Monnerat
Closes #9582

2 years agocurl_setup: disable use of FLOSS for 64-bit NonStop builds
Randall S. Becker [Thu, 22 Sep 2022 14:49:13 +0000 (08:49 -0600)] 
curl_setup: disable use of FLOSS for 64-bit NonStop builds

Older 32-bit builds currently need FLOSS. This dependency may be removed
in future OS releases.

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Closes #9575

2 years agotool: remove dead code
Patrick Monnerat [Fri, 23 Sep 2022 09:51:06 +0000 (11:51 +0200)] 
tool: remove dead code

Add a debug assertion to verify protocols included/excluded in a set
are always tokenized.

Follow-up to commit 677266c.

Closes #9576

2 years agolib: prepare the incoming of additional protocols
Patrick Monnerat [Thu, 22 Sep 2022 13:27:04 +0000 (15:27 +0200)] 
lib: prepare the incoming of additional protocols

Move the curl_prot_t to its own conditional block. Introduce symbol
PROTO_TYPE_SMALL to control it.

Fix a cast in a curl_prot_t assignment.
Remove an outdated comment.

Follow-up to cd5ca80.

Closes #9534

2 years agomsh3: change the static_assert to make the code C89
Daniel Stenberg [Wed, 21 Sep 2022 08:36:41 +0000 (10:36 +0200)] 
msh3: change the static_assert to make the code C89

2 years agobearssl: make it proper C89 compliant
Daniel Stenberg [Wed, 21 Sep 2022 08:32:54 +0000 (10:32 +0200)] 
bearssl: make it proper C89 compliant

2 years agocurl-compilers.m4: for gcc + want warnings, set gnu89 standard
Daniel Stenberg [Tue, 20 Sep 2022 08:56:44 +0000 (10:56 +0200)] 
curl-compilers.m4: for gcc + want warnings, set gnu89 standard

To better verify that the code is C89

Closes #9542

2 years agolib517: fix C89 constant signedness
Patrick Monnerat [Thu, 22 Sep 2022 10:35:52 +0000 (12:35 +0200)] 
lib517: fix C89 constant signedness

In C89, positive integer literals that overflow an int but not an
unsigned int may be understood as a negative int.

lib517.c:129:3: warning: this decimal constant is unsigned only in ISO C90
   {"Sun, 06 Nov 2044 08:49:37 GMT", 2362034977 },
   ^

Closes #9572

2 years agomprintf: use snprintf if available
Daniel Stenberg [Thu, 22 Sep 2022 09:52:08 +0000 (11:52 +0200)] 
mprintf: use snprintf if available

This is the single place in libcurl code where it uses the "native"
s(n)printf() function. Used for writing floats. The use has been
reviewed and vetted and uses a HUGE target buffer, but switching to
snprintf() still makes this safer and removes build-time warnings.

Reported-by: Philip Heiduck
Fixes #9569
Closes #9570

2 years agodocs: tag curl options better in man pages
Daniel Stenberg [Thu, 22 Sep 2022 15:07:09 +0000 (17:07 +0200)] 
docs: tag curl options better in man pages

As it makes them links in the HTML versions.

Verified by the extended test 1176

2 years agosymbols-in-versions: CURLOPT_ENCODING is deprecated since 7.21.6
Daniel Stenberg [Thu, 22 Sep 2022 15:06:49 +0000 (17:06 +0200)] 
symbols-in-versions: CURLOPT_ENCODING is deprecated since 7.21.6

2 years agomanpage-syntax.pl: all libcurl option symbols should be \fI-tagged
Daniel Stenberg [Thu, 22 Sep 2022 15:05:35 +0000 (17:05 +0200)] 
manpage-syntax.pl: all libcurl option symbols should be \fI-tagged

... as that makes them links to their corresponding man page.

This script is used for test 1173.

Closes #9574

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 22 Sep 2022 12:14:28 +0000 (14:14 +0200)] 
RELEASE-NOTES: synced

2 years agotool: remove protocol count limitation
Patrick Monnerat [Wed, 21 Sep 2022 08:41:22 +0000 (10:41 +0200)] 
tool: remove protocol count limitation

Replace bit mask protocol sets by null-terminated arrays of protocol
tokens. These are the addresses of the protocol names returned by
curl_version_info().

Protocol names are sorted case-insensitively before output to satisfy CI
tests matches consistency.

The protocol list returned by curl_version_info() is augmented with all
RTMP protocol variants.

Test 1401 adjusted for new alpha ordered output.

Closes #9546

2 years agotest972: verify the output without using external tool
Daniel Stenberg [Wed, 21 Sep 2022 10:32:16 +0000 (12:32 +0200)] 
test972: verify the output without using external tool

It seems too restrictive to assume and use an external tool to verify
the JSON. This now verifies the outut byte per byte. We could consider
building a local "JSON verifyer" in a future.

Remove 'jsonlint' from the CI job.

Reported-by: Marcel Raad
Fixes #9563
Closes #9564

2 years agohostip: lazily wait to figure out if IPv6 works until needed
Daniel Stenberg [Wed, 21 Sep 2022 06:52:57 +0000 (08:52 +0200)] 
hostip: lazily wait to figure out if IPv6 works until needed

The check may take many milliseconds, so now it is performed once the
value is first needed. Also, this change makes sure that the value is
not used if the resolve is set to be IPv4-only.

Closes #9553

2 years agocurl.h: fix mention of wrong error code in comment
Daniel Stenberg [Tue, 20 Sep 2022 12:53:08 +0000 (14:53 +0200)] 
curl.h: fix mention of wrong error code in comment

The same error and comment were also used and is now corrected in
CURLOPT_SSH_KEYFUNCTION.3

2 years agosymbol-scan.pl: scan and verify .3 man pages
Daniel Stenberg [Tue, 20 Sep 2022 12:50:09 +0000 (14:50 +0200)] 
symbol-scan.pl: scan and verify .3 man pages

This script now also finds all .3 man pages in docs/include and
docs/include/opts, extracts all uses of CURL* symbols and verifies that all
symbols mentioned in docs are defined in public headers.

A "global symbol" is one of those matching a known prefix and the script makes
an attempt to check all/most of them. Just using *all* symbols that match
CURL* proved matching a little too many other references as well and turned
difficult turning into something useful.

Closes #9544

2 years agosymbols-in-versions: add missing LIBCURL* symbols
Daniel Stenberg [Tue, 20 Sep 2022 12:10:13 +0000 (14:10 +0200)] 
symbols-in-versions: add missing LIBCURL* symbols

2 years agosymbol-scan.pl: also check for LIBCURL* symbols
Daniel Stenberg [Tue, 20 Sep 2022 11:52:33 +0000 (13:52 +0200)] 
symbol-scan.pl: also check for LIBCURL* symbols

Closes #9544

2 years agodocs/libcurl/symbols-in-versions: add several missing symbols
Daniel Stenberg [Tue, 20 Sep 2022 11:48:21 +0000 (13:48 +0200)] 
docs/libcurl/symbols-in-versions: add several missing symbols

2 years agotest1119: scan all public headers
Daniel Stenberg [Tue, 20 Sep 2022 11:32:58 +0000 (13:32 +0200)] 
test1119: scan all public headers

Previously this test only scanned a subset of the headers, which made us
accidentally miss symbols that were provided in the others. Now, the script
iterates over all headers present in include/curl.

Closes #9544

2 years agoexamples/chkspeed: improve portability
Patrick Monnerat [Wed, 21 Sep 2022 09:18:27 +0000 (11:18 +0200)] 
examples/chkspeed: improve portability

The example program chkspeed uses strncasecmp() which is not portable
across systems. Replace calls to this function by tests on characters.

Closes #9562

2 years agoeasy: fix the #include order
Daniel Stenberg [Wed, 21 Sep 2022 09:17:32 +0000 (11:17 +0200)] 
easy: fix the #include order

The mentioned "last 3 includes" order should be respected. easy_lock.h should
be included before those three.

Reported-by: Yuriy Chernyshov
Fixes #9560
Closes #9561

2 years agodocs: spellfixes
Daniel Stenberg [Tue, 20 Sep 2022 21:30:19 +0000 (23:30 +0200)] 
docs: spellfixes

Pointed by the new CI job

2 years agoGHA: spellcheck
Daniel Stenberg [Tue, 20 Sep 2022 21:30:02 +0000 (23:30 +0200)] 
GHA: spellcheck

This spellchecker checks markdown files. For this reason this job
converts all man pages in the repository to markdown with pandoc before
the check runs.

The perl script 'cleanspell' filters out details from the man page in
the process, to avoid the spellchecker trying to spellcheck things it
can't. Like curl specific symbols and the SYNOPSIS and EXAMPLE sections
of libcurl man pages.

The spell checker does not check words in sections that are within pre,
strong and em tags.

'spellcheck.words' is a custom word list with additional accepted words.

Closes #9523

2 years agoconnect: fix the wrong error message on connect failures
Daniel Stenberg [Wed, 21 Sep 2022 07:06:49 +0000 (09:06 +0200)] 
connect: fix the wrong error message on connect failures

The "Failed to connect to" message after a connection failure would
include the strerror message based on the presumed previous socket
error, but in times it seems that error number is not set when reaching
this code and therefore it would include the wrong error message.

The strerror message is now removed from here and the curl_easy_strerror
error is used instead.

Reported-by: Edoardo Lolletti
Fixes #9549
Closes #9554

2 years agohttpput-postfields.c: shorten string for C89 compliance
Daniel Stenberg [Wed, 21 Sep 2022 07:32:12 +0000 (09:32 +0200)] 
httpput-postfields.c: shorten string for C89 compliance

httpput-postfields.c:41:3: error: string length ‘522’ is greater than the length ‘509’ ISO C90 compilers are required to support [-Woverlength-strings]
   41 |   "this chapter.";
      |   ^~~~~~~~~~~~~~~

Closes #9555

2 years agows: fix a C89 compliance nit
Daniel Stenberg [Tue, 20 Sep 2022 08:54:22 +0000 (10:54 +0200)] 
ws: fix a C89 compliance nit

Closes #9541

2 years agounit test 1655: make it C89-compliant
Patrick Monnerat [Wed, 21 Sep 2022 01:00:30 +0000 (03:00 +0200)] 
unit test 1655: make it C89-compliant

Initializations performed in unit test 1655 use automatic variables in
aggregates and thus can only be computed at run-time. Using gcc in C89
dialect mode produces warning messages like:

unit1655.c:96:7: warning: initializer element is not computable at load time [-Wpedantic]
   96 |     { toolong, DOH_DNS_NAME_TOO_LONG },  /* expect early failure */
      |       ^~~~~~~

Fix the problem by converting these automatic pointer variables to
static arrays.

Closes #9551

2 years agocurl_strequal.3: fix typo
Tobias Schaefer [Tue, 20 Sep 2022 19:04:23 +0000 (21:04 +0200)] 
curl_strequal.3: fix typo

Closes #9548

2 years agoresolve: make forced IPv4 resolve only use A queries
Dmitry Karpov [Mon, 19 Sep 2022 20:59:35 +0000 (13:59 -0700)] 
resolve: make forced IPv4 resolve only use A queries

This protects IPv4-only transfers from undesired bad IPv6-related side
effects and make IPv4 transfers in dual-stack libcurl behave the same
way as in IPv4 single-stack libcurl.

Closes #9540