                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

                                  Changelog

Version 7.85.0 (31 Aug 2022)

Daniel Stenberg (31 Aug 2022)
- RELEASE-NOTES: synced

  curl 7.85.0 release

- THANKS: add contributors from the 7.85.0 release

- getparam: correctly clean args

  Follow-up to bf7e887b2442783ab52

  The previous fix for #9128 was incomplete and caused #9397.

  Fixes #9397
  Closes #9399

- zuul: remove the clang-tidy job

  Turns out we don't see the warnings, but the warnings right now are
  plain ridiculous and unhelpful so we can just as well just kill this
  job.

  Closes #9390

- cmake: set feature PSL if present

  ... make test 1014 pass when libpsl is used.

  Closes #9391

- lib530: simplify realloc failure exit path

  To make code analyzers happier

  Closes #9392

- [Orgad Shaneh brought this change]

  tests: add tests for netrc login/password combinations

  Covers the following PRs:

  - #9066
  - #9247
  - #9248

  Closes #9256

- [Orgad Shaneh brought this change]

  url: really use the user provided in the url when netrc entry exists

  If the user is specified as part of the URL, and the same user exists
  in .netrc, Authorization header was not sent at all.

  The user and password fields were assigned in conn->user and password
  but the user was not assigned to data->state.aptr, which is the field
  that is used in output_auth_headers and friends.

  Fix by assigning the user also to aptr.

  Amends commit d1237ac906ae7e3cd7a22c3a2d3a135a97edfbf5.

  Fixes #9243

- [Orgad Shaneh brought this change]

  netrc: Use the password from lines without login

  If netrc entry has password with empty login, use it for any username.

  Example:
  .netrc:
  machine example.com password 123456

  curl -vn http://user@example.com/

  Fix it by initializing state_our_login to TRUE, and reset it only when
  finding an entry with the same host and different login.

  Closes #9248

- [Jay Satiro brought this change]

  url: treat missing usernames in netrc as empty

  - If, after parsing netrc, there is a password with no username then
    set a blank username.

  This used to be the case prior to 7d600ad (precedes 7.82). Note
  parseurlandfillconn already does the same thing for URLs.

  Reported-by: Raivis <standsed@users.noreply.github.com>
  Testing-by: Domen Kožar

  Fixes https://github.com/curl/curl/issues/8653
  Closes #9334
  Closes #9066

- test8: verify that "ctrl-byte cookies" are ignored

- cookie: reject cookies with "control bytes"

  Rejects 0x01 - 0x1f (except 0x09) plus 0x7f

  Reported-by: Axel Chong

  Bug: https://curl.se/docs/CVE-2022-35252.html

  CVE-2022-35252

  Closes #9381

- libssh: ignore deprecation warnings

  libssh 0.10.0 marks all SCP functions as "deprecated" which causes
  compiler warnings and errors in our CI jobs and elsewhere. Ignore
  deprecation warnings if 0.10.0 or later is found in the build.

  If they actually remove the functions at a later point, then someone can
  deal with that pain and functionality break then.

  Fixes #9382
  Closes #9383

- Revert "schannel: when importing PFX, disable key persistence"

  This reverts commit 70d010d285315e5f1cad6bdb4953e167b069b692.

  Due to further reports in #9300 that indicate this commit might
  introduce problems.

- multi: use larger dns hash table for multi interface

  Have curl_multi_init() use a much larger DNS hash table than used for
  the easy interface to scale and perform better when used with _many_
  host names.

  curl_share_init() sets an in-between size.

  Inspired-by: Ivan Tsybulin
  See #9340
  Closes #9376

Marc Hoersken (28 Aug 2022)
- CI/runtests.pl: add param for dedicated curl to talk to APIs

  This should make it possible to also report test failures
  if our freshly build curl binary is not fully functional.

  Reviewed-by: Daniel Stenberg
  Closes #9360

Daniel Stenberg (27 Aug 2022)
- [Jacob Tolar brought this change]

  openssl: add cert path in error message

  Closes #9349

- [Jacob Tolar brought this change]

  cert.d: clarify that escape character works for file paths

  Closes #9349

- gha: move over ngtcp2-gnutls CI job from zuul

  Closes #9331

Marc Hoersken (26 Aug 2022)
- cmake: add detection of threadsafe feature

  Avoids failing test 1014 by replicating configure checks
  for HAVE_ATOMIC and _WIN32_WINNT with custom CMake tests.

  Reviewed-by: Marcel Raad

  Follow up to #8680
  Closes #9312

Daniel Stenberg (26 Aug 2022)
- RELEASE-NOTES: synced

Marc Hoersken (26 Aug 2022)
- CI/azure: align torture shallowness with GHA

  There 25 is used with FTP tests skipped, and 20 for FTP tests.
  This should make torture tests stay within the 60min timeout.

  Reviewed-by: Daniel Stenberg
  Closes #9371

- multi_wait: fix and improve Curl_poll error handling on Windows

  First check for errors and return CURLM_UNRECOVERABLE_POLL
  before moving forward and waiting on socket readiness events.

  Reviewed-by: Jay Satiro
  Reviewed-by: Marcel Raad

  Reported-by: Daniel Stenberg
  Ref: #9361

  Follow up to #8961
  Closes #9372

- multi_wait: fix skipping to populate revents for extra_fds

  On Windows revents was not populated for extra_fds if
  multi_wait had to wait due to the Curl_poll pre-check
  not signalling any readiness. This commit fixes that.

  Reviewed-by: Marcel Raad
  Reviewed-by: Jay Satiro

  Closes #9361

- CI/appveyor: disable TLS in msys2-native autotools builds

  Schannel cannot be used from msys2-native Linux-emulated builds.

  Reviewed-by: Marcel Raad
  Reviewed-by: Daniel Stenberg

  Follow up to #9367
  Closes #9370

Jay Satiro (25 Aug 2022)
- tests: fix http2 tests to use CRLF headers

  Prior to this change some tests that rely on nghttpx proxy did not use
  CRLF headers everywhere. A recent change in nghttp2, which updated its
  version of llhttp (HTTP parser), requires curl's HTTP/1.1 test server to
  use CRLF headers.

  Ref: https://github.com/nghttp2/nghttp2/commit/9d389e8

  Fixes https://github.com/curl/curl/issues/9364
  Closes https://github.com/curl/curl/pull/9365

Daniel Stenberg (25 Aug 2022)
- [rcombs brought this change]

  multi: use a pipe instead of a socketpair on apple platforms

  Sockets may be shut down by the kernel when the app is moved to the
  background, but pipes are not.

  Removed from KNOWN_BUGS

  Fixes #6132
  Closes #9368

- [Somnath Kundu brought this change]

  libssh2: provide symlink name in SFTP dir listing

  When reading the symbolic link name for a file, we need to add the file
  name to base path name.

  Closes #9369

- configure: if asked to use TLS, fail if no TLS lib was detected

  Previously the configure script would just warn about this fact and
  continue with TLS disabled build which is not always helpful. TLS should
  be explicitly disabled if that is what the user wants.

  Closes #9367

- [Dustin Howett brought this change]

  schannel: when importing PFX, disable key persistence

  By default, the PFXImportCertStore API persists the key in the user's
  key store (as though the certificate was being imported for permanent,
  ongoing use.)

  The documentation specifies that keys that are not to be persisted
  should be imported with the flag `PKCS12_NO_PERSIST_KEY`.
  NOTE: this flag is only supported on versions of Windows newer than XP
  and Server 2003.

  Fixes #9300
  Closes #9363

- unit1303: four tests should have TRUE for 'connecting'

  To match the comments.

  Reported-by: Wu Zheng

  See #9355
  Closes #9356

- CURLOPT_BUFFERSIZE.3: add upload buffersize to see also

  Closes #9354

- [Fabian Fischer brought this change]

  HTTP3.md: add missing autoreconf command for building with wolfssl

  Closes #9353

- RELEASE-NOTES: synced

- multi: have curl_multi_remove_handle close CONNECT_ONLY transfer

  Ẃhen it has been used in the multi interface, it is otherwise left in
  the connection cache, can't be reused and nothing will close them since
  the easy handle loses the association with the multi handle and thus the
  connection cache - until the multi handle is closed or it gets pruned
  because the cache is full.

  Reported-by: Dominik Thalhammer
  Fixes #9335
  Closes #9342

- docs/cmdline-opts: remove \& escapes from all .d files

  gen.pl escapes them itself now

- docs/cmdline-opts/gen.pl: encode leading single and double quotes

  As "(aq" and "(dq" to prevent them from implying a meaning in the nroff
  output. This removes the need for using \& escapes in the .d files'
  description parts.

  Closes #9352

Marc Hoersken (23 Aug 2022)
- tests/server/sockfilt.c: avoid race condition without a mutex

  Avoid loosing any triggered handles by first aborting and joining
  the waiting threads before evaluating the individual signal state.

  This removes the race condition and therefore need for a mutex.

  Closes #9023

Daniel Stenberg (22 Aug 2022)
- [Emil Engler brought this change]

  url: output the maximum when rejecting a url

  This commit changes the failf message to output the maximum length, when
  curl refuses to process a URL because it is too long.

  See: #9317
  Closes: #9327

- [Chris Paulson-Ellis brought this change]

  configure: fix broken m4 syntax in TLS options

  Commit b589696f added lines to some shell within AC_ARG_WITH macros, but
  inadvertently failed to move the final closing ).

  Quote the script section using braces.

  So, if these problems have been around for a while, how did I find them?
  Only because I did a configure including these options:

      $ ./configure --with-openssl --without-rustls
        SSL:              enabled (OpenSSL)

  Closes #9344

- tests/data/CMakeLists: remove making the 'show' makefile target

  It is not used by runtests since 3c0f462

  Closes #9333

- tests/data/Makefile: remove 'filecheck' target

  No practical use anymore since 3c0f4622cdfd6

  Closes #9332

- libssh2: make atime/mtime date overflow return error

  Closes #9328

- libssh: make atime/mtime date overflow return error

  Closes #9328

- examples/curlx.c: remove

  This example is a bit convoluted to use as an example, combined with the
  special license for it makes it unsuitable.

  Closes #9330

- [Tobias Nygren brought this change]

  curl.h: include <sys/select.h> on SunOS

  It is needed for fd_set to be visible to downstream consumers that use
  <curl/multi.h>. Header is known to exist at least as far back as Solaris
  2.6.

  Closes #9329

- DEPRECATE.md: push the NSS deprecation date forward one year to 2023

  URL: https://curl.se/mail/lib-2022-08/0016.html

- libssh2: setting atime or mtime >32bit on 4-bytes-long systems

  Since the libssh2 API uses 'long' to store the timestamp, it cannot
  transfer >32bit times on Windows and 32bit architecture builds.

  Avoid nasty surprises by instead not setting such time.

  Spotted by Coverity

  Closes #9325

- libssh: setting atime or mtime > 32bit is now just skipped

  The libssh API used caps the time to an unsigned 32bit variable. Avoid
  nasty surprises by instead not setting such time.

  Spotted by Coverity.

  Closes #9324

Jay Satiro (16 Aug 2022)
- KNOWN_BUGS: Windows Unicode builds use homedir in current locale

  Bug: https://github.com/curl/curl/pull/7252
  Reported-by: dEajL3kA@users.noreply.github.com

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

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

Daniel Stenberg (16 Aug 2022)
- test399: switch it to use a config file instead

  ... as using a 65535 bytes host name in a URL does not fit on the
  command line on some systems - like Windows.

  Reported-by: Marcel Raad
  Fixes #9321
  Closes #9322

- RELEASE-NOTES: synced

- asyn-ares: make a single alloc out of hostname + async data

  This saves one alloc per name resolve and simplifies the exit path.

  Closes #9310

- Curl_close: call Curl_resolver_cancel to avoid memory-leak

  There might be a pending (c-ares) resolve that isn't free'd up yet.

  Closes #9310

- asyn-thread: fix socket leak on OOM

  Closes #9310

- GHA: mv CI torture test from Zuul

  Closes #9310

- ngtcp2-wolfssl.yml: add GHA to build ngtcp2 + wolfSSL

  Closes #9318

- test399: verify check of too long host name

- url: reject URLs with hostnames longer than 65535 bytes

  It *probably* causes other problems too since DNS can't resolve such
  long names, but the SNI field in TLS is limited to 16 bits length.

  Closes #9317

- curl_multi_perform.3: minor language fix

  Closes #9316

- ngtcp2: fix picky compiler warnings with wolfSSL for QUIC

  Follow-up to 8a13be227eede2

  Closes #9315

- ngtcp2: remove leftover variable

  Mistake leftover from my edit before push.

  Follow-up from 8a13be227eede2601c2b3b
  Reported-by: Viktor Szakats
  Bug: https://github.com/curl/curl/pull/9290#issuecomment-1214569167

Viktor Szakats (15 Aug 2022)
- Makefile.m32: allow -nghttp3/-ngtcp2 without -ssl [ci skip]

  Before this patch `-nghttp3`/`-ngtcp2` had an effect only when `-ssl`
  was also enabled. `-ssl` meaning OpenSSL (and its forks). After
  8a13be227eede2601c2b3b1c63e08b3dc9b35dd5 nghttp3/ngtcp2 can also be
  used together with wolfSSL. This patch adds the ability to enable
  `-nghttp3`/`-ngtcp2` independently from `-ssl` (OpenSSL), allowing to
  use it with wolfSSL or other, future TLS backends.

  Before this patch, it was fine to enable `-nghttp3`/`-ngtcp2`
  unconditionally. After this patch, this is no longer the case, and now
  it's the user's responsibility to enable `-nghttp3`/`-ngtcp2` only
  together with a compatible TLS backend.

  When using a TLS backend other than OpenSSL, the TLS-specific ngtcp2
  library must be configured manually, e.g.:
    `export CURL_LDFLAG_EXTRAS=-lngtcp2_crypto_wolfssl`

  (or via `NGTCP2_LIBS`)

  Closes #9314

Daniel Stenberg (15 Aug 2022)
- [Stefan Eissing brought this change]

  quic: add support via wolfSSL

  - based on ngtcp2 PR https://github.com/ngtcp2/ngtcp2/pull/505
  - configure adapted to build against ngtcp2 wolfssl crypto lib
  - quic code added for creation of WOLFSSL* instances

  Closes #9290

Marcel Raad (14 Aug 2022)
- [David Carlier brought this change]

  memdebug: add annotation attributes

  memory debug tracking annotates whether the returned pointer does not
  `alias`, hints where the size required is, for Windows to be better
  debugged via Visual Studio.

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

Daniel Stenberg (14 Aug 2022)
- GHA: move libressl CI from zuul to GitHub

  Closes #9309

- KNOWN_BUGS: FTPS directory listing hangs on Windows with Schannel

  Closes #9161

- KNOWN_BUGS: CURLOPT_CERTINFO results in CURLE_OUT_OF_MEMORY with Schannel

  Closes #8741

- KNOWN_BUGS: libssh blocking and infinite loop problem

  Closes #8632

- RELEASE-NOTES: synced

- msh3: fix the QUIC disconnect function

  And free request related memory better in 'done'. Fixes a memory-leak.

  Reported-by: Gisle Vanem
  Fixes #8915
  Closes #9304

- connect: close the happy eyeballs loser connection when using QUIC

  Reviewed-by: Nick Banks

  Closes #9303

- [Emil Engler brought this change]

  refactor: split resolve_server() into functions

  This commit splits the branch-heavy resolve_server() function into
  various sub-functions, in order to reduce the amount of nested
  if/else-statements.

  Beside this, it also removes many else-sequences, by returning in the
  previous if-statement.

  Closes #9283

- schannel: re-indent to use curl style better

  Only white space changes

  Closes #9301

- [Emanuele Torre brought this change]

  docs/cmdline-opts: fix example and categories for --form-escape

  The example was missing a "--form" argument
  I also replaced "--form" with "-F" to shorten the line a bit since it
  was already very long.

  And I also moved --form-escape from the "post" category to the "upload"
  category (this is what I originally wanted to fix, before also noticing
  the mistake in the example).

  Closes #9298

- [Nick Banks brought this change]

  HTTP3.md: update to msh3 v0.4.0

  Closes #9297

- hostip: resolve *.localhost to 127.0.0.1/::1

  Following the footsteps of other clients like Firefox/Chrome.  RFC 6761
  says clients SHOULD do this.

  Add test 389 to verify.

  Reported-by: TheKnarf on github
  Fixes #9192
  Closes #9296

Jay Satiro (11 Aug 2022)
- KNOWN_BUGS: long paths are not fully supported on Windows

  Bug: https://github.com/curl/curl/issues/8361
  Reported-by: Gisle Vanem

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

Daniel Stenberg (11 Aug 2022)
- config: remove the check for and use of SIZEOF_SHORT

  shorts are 2 bytes on all platforms curl runs and have ever run on.

  Closes #9291

- configure: introduce CURL_SIZEOF

  This is a rewrite of the previously used GPLv3+exception licensed
  file. With this change, there is no more reference to GPL so we can
  remove that from LICENSES/.

  Ref: #9220
  Closes #9291

- [Sean McArthur brought this change]

  hyper: customize test1274 to how hyper unfolds headers

  Closes #9217

- [Orgad Shaneh brought this change]

  curl-config: quote directories with potential space

  On Windows (at least with CMake), the default prefix is
  C:/Program Files (x86)/CURL.

  Closes #9253

- [Oliver Roberts brought this change]

  amigaos: fix threaded resolver on AmigaOS 4.x

  Replace ip4 resolution function on AmigaOS 4.x, as it requires runtime
  feature detection and extra code to make it thread safe.

  Closes #9265

- [Emil Engler brought this change]

  imap: use ISALNUM() for alphanumeric checks

  This commit replaces a self-made character check for alphanumeric
  characters within imap_is_bchar() with the ISALNUM() macro, as it is
  reduces the size of the code and makes the performance better, due to
  ASCII arithmetic.

  Closes #9289

- RELEASE-NOTES: synced

- [Cering on github brought this change]

  connect: add quic connection information

  Fixes #9286
  Closes #9287

- [Philip H brought this change]

  cirrus/freebsd-ci: bootstrap the pip installer

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

  Closes #9213

- urldata: move smaller fields down in connectdata struct

  By (almost) sorting the struct fields in connectdata in a decending size
  order, having the single char ones last, we reduce the number of holes
  in the struct and thus the amount of storage needed.

  Closes #9280

- ldap: adapt to conn->port now being an 'int'

  Remove typecasts. Fix printf() formats.

  Follow-up from 764c6bd3bf.
  Pointed out by Coverity CID 1507858.

  Closes #9281

- KNOWN_BUGS: Negotiate authentication against Hadoop HDFS

  Closes #8264

- [Oliver Roberts brought this change]

  file: add handling of native AmigaOS paths

  On AmigaOS 4.x, handle native absolute paths, whilst blocking relative
  paths. Also allow unix style paths if feature enabled at link time.

  Inspiration-from: Michael Trebilcock

  Closes #9259

- KNOWN_BUGS: cmake build is not thread-safe

  The cmake build does not check for and verify presence of a working
  Atomic type, which then makes curl_global_init() to not build
  thread-safe on non-Windows platforms.

  Closes https://github.com/curl/curl/issues/8973
  Closes https://github.com/curl/curl/pull/8982

- [Oliver Roberts brought this change]

  configure: fixup bsdsocket detection code for AmigaOS 4.x

  The code that detects bsdsocket.library for AmigaOS did not work
  for AmigaOS 4.x. This has been fixed and also cleaned up a little
  to reduce duplication. Wasn't technically necessary before, but is
  required when building with AmiSSL instead of OpenSSL.

  Closes #9268

- [Oliver Roberts brought this change]

  tool: reintroduce set file comment code for AmigaOS

  Amiga specific code which put the URL in the file comment was perhaps
  accidentally removed in b88940850002a3f1c25bc6488b95ad30eb80d696 having
  originally been added in 5c215bdbdfde8b2350cdcbac82aae0c914da5314.
  Reworked to fit the code changes and added it back in.

  Reported-by: Michael Trebilcock
  Originally-added-by: Chris Young

  Closes #9258

- urldata: make 'negnpn' use less storage

  The connectdata struct field 'negnpn' never holds a value larger than
  30, so an unsigned char saves 3 bytes struct space.

  Closes #9279

- urldata: make three *_proto struct fields smaller

  Use 'unsigned char' for storage instead of the enum, for three GSSAPI
  related fields in the connectdata struct.

  Closes #9278

- connect: set socktype/protocol correctly

  So that an address used from the DNS cache that was previously used for
  QUIC can be reused for TCP and vice versa.

  To make this possible, set conn->transport to "unix" for unix domain
  connections ... and store the transport struct field in an unsigned char
  to use less space.

  Reported-by: ウさん
  Fixes #9274
  Closes #9276

- [Oliver Roberts brought this change]

  amissl: allow AmiSSL to be used with AmigaOS 4.x builds

  Enable AmiSSL to be used instead of static OpenSSL link libraries.
  for AmigaOS 4.x, as it already is in the AmigaOS 3.x build.

  Closes #9269

- [opensignature on github brought this change]

  openssl: add details to "unable to set client certificate" error

  from: "curl: (58) unable to set client certificate"

  to: curl: (58) unable to set client certificate [error:0A00018F:SSL
  routines::ee key too small]

  Closes #9228

- [Oliver Roberts brought this change]

  amissl: make AmiSSL v5 a minimum requirement

  AmiSSL v5 is the latest version, featuring a port of OpenSSL 3.0.
  Support for previous OpenSSL 1.1.x versions has been dropped, so
  makes sense to enforce v5 as the minimum requirement. This also
  allows all the AmiSSL stub workarounds to be removed as they are
  now provided in a link library in the AmiSSL SDK.

  Closes #9267

- [Oliver Roberts brought this change]

  configure: -pthread not available on AmigaOS 4.x

  The most recent GCC builds for AmigaOS 4.x do not allow -pthread and
  exit with an error. Instead, need to explictly specify -lpthread.

  Closes #9266

- digest: pass over leading spaces in qop values

  When parsing the "qop=" parameter of the digest authentication, and the
  value is provided within quotes, the list of values can have leading
  white space which the parser previously did not handle correctly.

  Add test case 388 to verify.

  Reported-by: vlubart on github
  Fixes #9264
  Closes #9270

- [Evgeny Grin (Karlson2k) brought this change]

  digest: reject broken header with session protocol but without qop

  Closes #9077

- CURLINFO_SPEED_UPLOAD/DOWNLOAD.3: fix examples

  Reported-by: jvvprasad78 on github
  Assisted-by: Jay Satiro
  Fixes #9239
  Closes #9241

- [Fabian Keil brought this change]

  test44[2-4]: add '--resolve' to the keywords

  ... so the tests can be automatically skipped when
  using an external proxy like Privoxy.

  Closes #9250

- RELEASE-NOTES: synced

- CURLOPT_CONNECT_ONLY.3: clarify multi API use

  Reported-by: Maxim Ivanov
  Fixes #9244
  Closes #9262

- [Andrew Lambert brought this change]

  curl_easy_header: Add CURLH_PSEUDO to sanity check

  Fixes #9235
  Closes #9236

- [Emil Engler brought this change]

  docs: add dns category to --resolve

  This commit adds the dns category to the --resolve command line option,
  because it can be interpreted as both: a low-level connection option and
  an option related to the resolving of a hostname.

  It is also not common for dns options to belong to the connection
  category and vice versa.  --ipv4 and --ipv6 are both good examples.

  Closes #9229

Jay Satiro (2 Aug 2022)
- [Wyatt O'Day brought this change]

  schannel: Add TLS 1.3 support

  - Support TLS 1.3 as the default max TLS version for Windows Server 2022
    and Windows 11.

  - Support specifying TLS 1.3 ciphers via existing option
    CURLOPT_TLS13_CIPHERS (tool: --tls13-ciphers).

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

Daniel Stenberg (2 Aug 2022)
- [Emil Engler brought this change]

  cmdline-opts/gen.pl: improve performance

  On some systems, the gen.pl script takes nearly two minutes for the
  generation of the main-page, which is a completely unacceptable time.

  The slow performance has two causes:
  1. Use of a regex locale operator
  2. Useless invokations of loops

  The commit addresses the first issue by replacing the "\W" wiht
  [^a-zA-Z0-9_], which is, according to regex101.com, functionally
  equivalent to the previous operation, except that it is obviously
  limited to ASCII only, which is fine, as the curl project is
  English-only anyway.

  The second issue is being addressed by only running the loop if the line
  contains a "--" in it. The loop may be completeley removed in the
  future.

  Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>

  See #8299
  Fixes #9230
  Closes #9232

- docs/cmdline: mark fail and fail-with-body as mutually exclusive

  Reported-by: Andreas Sommer
  Fixes #9221
  Closes #9222

- [Nao Yonashiro brought this change]

  quiche: fix build failure

  Reviewed-by: Alessandro Ghedini
  Closes #9223

Viktor Szakats (2 Aug 2022)
- configure.ac: drop references to deleted functions

  follow-up from 4d73854462f30948acab12984b611e9e33ee41e6

  Reported-by: Oliver Roberts
  Fixes #9238
  Closes #9240

Daniel Stenberg (28 Jul 2022)
- [Sean McArthur brought this change]

  hyper: enable obs-folded multiline headers

  Closes #9216

- connect: revert the use of IP*_RECVERR

  The options were added in #6341 and d13179d, but cause problems: Lots of
  POLLIN event occurs but recvfrom read nothing.

  Reported-by: Tatsuhiro Tsujikawa
  Fixes #9209
  Closes #9215

- [Marco Kamner brought this change]

  docs: remove him/her/he/she from documentation

  Closes #9208

- RELEASE-NOTES: synced

- tool_getparam: make --doh-url "" switch it off

  A possible future addition could be to parse the URL first too to verify
  that it is valid before trying to use it.

  Assisted-by: Jay Satiro
  Closes #9207

- mailmap: add rzrymiak on github

Jay Satiro (26 Jul 2022)
- ngtcp2: Fix build error due to change in nghttp3 prototypes

  ngtcp2/nghttp3@4a066b2 changed nghttp3_conn_block_stream and
  nghttp3_conn_shutdown_stream_write return from int to void.

  Reported-by: jurisuk@users.noreply.github.com

  Fixes https://github.com/curl/curl/issues/9204
  Closes https://github.com/curl/curl/pull/9200

Daniel Stenberg (26 Jul 2022)
- [rzrymiak on github brought this change]

  BUGS.md: improve language

  Closes #9205

- [Philip H brought this change]

  cirrus.yml: replace py38-pip with py39-pip

  Reported-by: Jay Satiro
  Fixes #9201
  Closes #9202

- tool_getparam: fix cleanarg() for unicode builds

  Use the correct type, and make cleanarg an empty macro if the cleaning
  ability is absent.

  Fixes #9195
  Closes #9196

  Reviewed-by: Jay Satiro
  Reviewed-by: Marcel Raad

Marc Hoersken (25 Jul 2022)
- test3026: add support for Windows using native Win32 threads

  Reviewed-by: Viktor Szakats
  Reviewed-by: Jay Satiro
  Reviewed-by: Daniel Stenberg

  Follow up to 7ade9c50b35d95d47a43880c3097bebab7a7e690
  Closes #9012

Jay Satiro (25 Jul 2022)
- [Evgeny Grin (Karlson2k) brought this change]

  digest: fix memory leak, fix not quoted 'opaque'

  Fix leak regression introduced by 3a6fe0c.

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

Daniel Stenberg (23 Jul 2022)
- tests: several enumerated type cleanups

  To please icc

  Closes #9179

- tool_paramhlp: fix "enumerated type mixed with another type"

  Warning by icc

  Closes #9179

- tool_writeout: fix enumerated type mixed with another type

  Closes #9179

- tool_cfgable: make 'synthetic_error' a plain bool

  The specific reason was not used.

  Closes #9179

- tool_paramhlp: make check_protocol return ParameterError

  "enumerated type mixed with another type"

  Closes #9179

- tool_formparse: fix variable may be used before its value is set

  Warning by icc

  Closes #9179

- sendf: skip storing HTTP headers if HTTP disabled

  Closes #9179

- url: enumerated type mixed with another type

  Follow-up to 1c58e7ae99ce2030213f28b

  Closes #9179

- urldata: change second proxytype field to unsigned char to match

  To avoid "enumerated type mixed with another type"

  Closes #9179

- http: typecast the httpreq assignment to avoid icc compiler warning

   error #188: enumerated type mixed with another type

  Closes #9179

- urldata: make state.httpreq an unsigned char

  To match set.method used for the same purpose.

  Closes #9179

- splay: avoid using -1 in unsigned variable

  To fix icc compiler warning integer conversion resulted in a change of sign

  Closes #9179

- sendf: store the header type in an usigned char to avoid icc warnings

  Closes #9179

- multi: fix the return code from Curl_pgrsDone()

  It does not return a CURLcode. Detected by the icc compiler warning
  "enumerated type mixed with another type"

  Closes #9179

- sendf: make Curl_debug a void function

  As virtually no called checked the return code, and those that did
  wrongly treated it as a CURLcode. Detected by the icc compiler warning:
  enumerated type mixed with another type

  Closes #9179

- http_chunks: remove an assign + typecast

  As it caused icc to complain: "pointer cast involving 64-bit pointed-to
  type"

  Closes #9179

- vtls: make Curl_ssl_backend() return the enum type curl_sslbackend

  To fix the icc warning enumerated type mixed with another type

  Closes #9179

- curl-compilers.m4: make icc use -diag* options and disable two warnings

  -wd and -we are deprecated and are now -diag-disable and -diag-error

  Disable warning 1024 and 2259

  Closes #9179

- [Matthew Thompson brought this change]

  GHA: add two Intel compiler CI jobs

  Closes #9179

- [Daniel Katz brought this change]

  curl-functions.m4: check whether atomics can link rather than just compile

  Some build toolchains support C11 atomics (i.e., _Atomic types), but
  will not link the associated atomics runtime unless a flag is passed. In
  such an environment, linking an application with libcurl.a can fail due
  to undefined symbols for atomic load/store functions.

  I encountered this behavior when upgrading curl to 7.84.0 and attempting
  to build with Solaris Studio 12.6. Solaris provides the flag
  -xatomic=[gcc | studio], allowing users to link to one of two atomics
  runtime implementations. However, if the user does not provide this
  flag, then neither runtime is linked. This led to builds failing in CI.

  Closes #9190

- [Rosen Penev brought this change]

  curl-wolfssl.m4: add options header when building test code

  Needed for certain configurations of wolfSSL. Otherwise, missing header
  error may occur.

  Tested with OpenWrt.

  Closes #9187

- ftp: use a correct expire ID for timer expiry

  This was an accurate error pointed out by the icc warning: enumerated
  type mixed with another type

  Ref: #9179
  Closes #9184

- sendf: fix paused header writes since after the header API

  Regression since d1e4a67

  Reported-by: Sergey Ogryzkov
  Fixes #9180
  Closes #9182

- mprintf: fix *dyn_vprintf() when out-of-memory

  Follow-up to 0e48ac1f99a. Torture-testing 1455 would lead to a memory
  leak otherwise.

  Closes #9185

- curl-confopts: remove leftover AC_REQUIREs

  configure.ac:3488: warning: CURL_CHECK_FUNC_IOCTL is m4_require'd but not m4_defun'd
  configure.ac:3488: warning: CURL_CHECK_FUNC_SETSOCKOPT is m4_require'd but not m4_defun'd

  follow-up from 4d73854462f30

  Closes #9183

- file: fix icc enumerated type mixed with another type warning

  Ref: #9179
  Closes #9181

Viktor Szakats (19 Jul 2022)
- tidy-up: delete unused build configuration macros

  Most of them feature guards:

  - `CURL_INCLUDES_SYS_UIO` [1]
  - `HAVE_ALLOCA_H` [2]
  - `HAVE_CRYPTO_CLEANUP_ALL_EX_DATA` (unused since de71e68000c8624ea13f90b136f8734dd0fb1bdc)
  - `HAVE_DLFCN_H`
  - `HAVE_DLOPEN`
  - `HAVE_DOPRNT`
  - `HAVE_FCNTL`
  - `HAVE_GETHOSTBYNAME` [3]
  - `HAVE_GETOPT_H`
  - `HAVE_GETPASS`
  - `HAVE_GETPROTOBYNAME`
  - `HAVE_GETSERVBYNAME`
  - `HAVE_IDN_FREE*`
  - `HAVE_INET_ADDR`
  - `HAVE_IOCTL`
  - `HAVE_KRB4`
  - `HAVE_KRB_GET_OUR_IP_FOR_REALM`
  - `HAVE_KRB_H`
  - `HAVE_LDAPSSL_H`
  - `HAVE_LDAP_INIT_FD`
  - `HAVE_LIBDL`
  - `HAVE_LIBNSL`
  - `HAVE_LIBRESOLV*`
  - `HAVE_LIBUCB`
  - `HAVE_LL`
  - `HAVE_LOCALTIME_R`
  - `HAVE_MALLOC_H`
  - `HAVE_MEMCPY`
  - `HAVE_MEMORY_H`
  - `HAVE_NETINET_IF_ETHER_H`
  - `HAVE_NI_WITHSCOPEID`
  - `HAVE_OPENSSL_CRYPTO_H`
  - `HAVE_OPENSSL_ERR_H`
  - `HAVE_OPENSSL_PEM_H`
  - `HAVE_OPENSSL_PKCS12_H`
  - `HAVE_OPENSSL_RAND_H`
  - `HAVE_OPENSSL_RSA_H`
  - `HAVE_OPENSSL_SSL_H`
  - `HAVE_OPENSSL_X509_H`
  - `HAVE_PEM_H`
  - `HAVE_POLL`
  - `HAVE_RAND_SCREEN`
  - `HAVE_RAND_STATUS`
  - `HAVE_RECVFROM`
  - `HAVE_SETSOCKOPT`
  - `HAVE_SETVBUF`
  - `HAVE_SIZEOF_LONG_DOUBLE`
  - `HAVE_SOCKIO_H`
  - `HAVE_SOCK_OPTS`
  - `HAVE_STDIO_H`
  - `HAVE_STRCASESTR`
  - `HAVE_STRFTIME`
  - `HAVE_STRLCAT`
  - `HAVE_STRNCMPI`
  - `HAVE_STRNICMP`
  - `HAVE_STRSTR`
  - `HAVE_STRUCT_IN6_ADDR`
  - `HAVE_TLD_H`
  - `HAVE_TLD_STRERROR`
  - `HAVE_UNAME`
  - `HAVE_USLEEP`
  - `HAVE_WINBER_H`
  - `HAVE_WRITEV`
  - `HAVE_X509_H`
  - `LT_OBJDIR`
  - `NEED_BASENAME_PROTO`
  - `NOT_NEED_LIBNSL`
  - `OPENSSL_NO_KRB5`
  - `RECVFROM_TYPE*`
  - `SIZEOF_LONG_DOUBLE`
  - `STRERROR_R_TYPE_ARG3`
  - `USE_YASSLEMUL`
  - `_USRDLL` (from CMake) [4]

  [1] Related parts in `m4/curl-functions.m4` and `configure.ac` might
      also be deleted.

  [2] Related comment can possibly be deleted in
      `packages/vms/generate_config_vms_h_curl.com`.

  [3] There are more instances of this in autotools, but I did not dare to
      touch those. Looked like it's used to detect socket support.

  [4] This is necessary for MFC (Microsoft Foundation Class) DLLs to
      force linking MFC components statically to the DLL. `libcurl.dll`
      does not use MFC, so we can delete this define.
      Ref: https://docs.microsoft.com/cpp/build/regular-dlls-statically-linked-to-mfc

  Script that can help finding unused settings like above:
  ```shell

  autoheader configure.ac  # generate lib/curl_config.h.in

  {
    grep -o -E    'set\([A-Z][A-Z0-9_]{3,}'          CMake/Platforms/WindowsCache.cmake | sed -E 's|set\(||g'
    grep -o -E -h '#define +[A-Z][A-Z0-9_]{3,}'      lib/config-*.h                     | sed -E 's|#define +||g'
    grep -o -E    '#cmakedefine +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.cmake            | sed -E 's|#cmakedefine +||g'
    grep -o -E    '#undef +[A-Z][A-Z0-9_]{3,}'       lib/curl_config.h.in               | sed -E 's|#undef +||g'
  } | sort -u | grep -v -F 'HEADER_CURL_' | while read -r def; do
    c="$(git grep -w -F "${def}" | grep -v -E -c '(/libcurl\.tmpl|^lib/config-|^lib/curl_config\.h\.cmake|^CMakeLists\.txt|^CMake/Platforms/WindowsCache\.cmake|^packages/vms/config_h\.com|^m4/curl-functions\.m4|^acinclude\.m4|^configure\.ac)')"
    if [ "${c}" = '0' ]; then
      echo "${def}"
    fi
  done
  ```

  Reviewed-by: Daniel Stenberg
  Closes #9044

Daniel Stenberg (19 Jul 2022)
- RELEASE-NOTES: synced

- cookie: treat a blank domain in Set-Cookie: as non-existing

  This matches what RFC 6265 section 5.2.3 says.

  Extended test 31 to verify.

  Fixes #9164
  Reported-by: Gwen Shapira
  Closes #9177

- [Patrick Monnerat brought this change]

  base64: base64url encoding has no padding

  See RFC4648 section 5 and RFC7540 section 3.2.1.

  Suppress generation of '=' padding of base64url encoding. This is
  accomplished by considering the string beginning at offset 64 in the
  character table as the padding: this is "=" for base64, "" for base64url.

  Also use strchr() to replace character search loops where possible.

  Suppress erroneous comments about empty encoding results.

  Adjust unit test 1302 to unpadded base64url encoding and add tests for
  empty results.

  Closes #9139

- easyoptions: fix icc warning

      easyoptions.c(360): error #188: enumerated type mixed with another type

  Ref: #9156
  Reported-by: Matthew Thompson
  Closes #9176

- [lwthiker brought this change]

  h2h3: fix overriding the 'TE: Trailers' header

  A 'TE: Trailers' header is explicitly replaced by 'te: trailers'
  (lowercase) in Curl_pseudo_headers() when building the list of HTTP/2 or
  HTTP/3 headers. However, this is then replaced again by the original
  value due to a bug, resulting in the uppercased version being sent. Some
  HTTP/2 servers reject the whole HTTP/2 stream when this is the case.

  Closes #9170

- lib3026: reduce the number of threads to 100

  Down from 1000, to make it run and work in more systems.

  Fixes #9172
  Reported-by: Érico Nogueira Rolim
  Closes #9173

- doh: move doh related struct definitions to doh.h

  and make 'dnstype' in 'struct dnsprobe' use the DNStype to fix the icc compiler warning:

    doh.c(924): error #188: enumerated type mixed with another type

  Reported-by: Matthew Thompson
  Ref #9156
  Closes #9174

Viktor Szakats (17 Jul 2022)
- Makefile.m32: stop trying to build libcares.a [ci skip]

  Before this patch, `lib/Makefile.m32` had a rule to build `libcares.a` in
  `-cares`-enabled builds, via c-ares's own `Makefile.m32`. Committed in
  2007 [1]. The commit message doesn't specifically address this particular
  change. This logic comes from the times when c-ares was part of the curl
  source tree, hence the special treatment.

  This feature creates problems when building c-ares first, using CMake
  and pointing `LIBCARES_PATH` to its install prefix, where `Makefile.m32`
  is missing in such case. A sub-build for c-ares is undesired also when
  c-ares had already been build via its own `Makefile.m32`.

  To avoid the sub-build, this patch deletes its Makefile rule. After this
  patch `libcares.a` needs to be manually built before using it in
  `Makefile.m32`. Aligning it with the rest of dependencies.

  [1] 46c92c0b806da041d7a5c6fb64dbcdc474d99b31

  Reviewed-by: Daniel Stenberg
  Closes #9169

Daniel Stenberg (17 Jul 2022)
- curl: writeout: fix repeated header outputs

  The function stored a terminating zero into the buffer for convenience,
  but when on repeated calls that would cause problems. Starting now, the
  passed in buffer is not modified.

  Reported-by: highmtworks on github
  Fixes #9150
  Closes #9152

- curl_multi_timeout.3: clarify usage

  Fixes #9155
  Closes #9157
  Reported-by: jvvprasad78 on github

- mprintf: make dprintf_formatf never return negative

  This function no longer returns a negative value if the formatting
  string is bad since the return value would sometimes be propagated as a
  return code from the mprintf* functions and they are documented to
  return the length of the output. Which cannot be negative.

  Fixes #9149
  Closes #9151
  Reported-by: yiyuaner on github

Viktor Szakats (17 Jul 2022)
- trace: 0x7F character is non-printable

  `0x7F` is `DEL`, a non-printable symbol, so print it as
  `UNPRINTABLE_CHAR`.

  Reported-by: MasterInQuestion on github
  Fixes #9162
  Closes #9166

- doh: use https protocol by default

  The only allowed protocol is https, so it makes sense to use that
  by default if not passed explicitly by the user.

  Reported-by: MasterInQuestion on github
  Reviewed-by: Jay Satiro
  Fixes #9163
  Closes #9165

- openssl: fix BoringSSL symbol conflicts with LDAP and Schannel

  Same issue as here [1], but this time when building curl with BoringSSL
  for Windows with LDAP(S) or Schannel support enabled.

  Apply the same fix [2] for these source files as well.

  This can also be fixed by moving `#include "urldata.h"` _before_
  including `winldap.h` and `schnlsp.h` respectively. This seems like
  a cleaner fix, though I'm not sure why it works and if it has any
  downside.

  [1] https://github.com/curl/curl/issues/5669
  [2] https://github.com/curl/curl/commit/fbe07c6829ba8c5793c84c2856526e19e9029ab9

  Co-authored-by: Jay Satiro
  Closes #9110

Daniel Stenberg (13 Jul 2022)
- asyn-thread: make getaddrinfo_complete return CURLcode

  ... as the only caller that cares about what it returns assumes that
  anyway. This caused icc to warn:

  asyn-thread.c(505): error #188: enumerated type mixed with another type
          result = getaddrinfo_complete(data);

  Repoorted-by: Matthew Thompson
  Bug: https://github.com/curl/curl/issues/9081#issuecomment-1182143076
  Closes #9146

- easy_lock: fix build with icc

  The Intel compiler tries to look like GCC *and* clang *and* it lies in
  its __has_builtin() function (returns true when it should return false),
  so override it.

  Reported-by: Matthew Thompson
  Fixes #9081
  Closes #9144

- configure: fix --disable-headers-api

  Reported-by: Michał Antoniak
  Fixes #9134
  Closes #9143

- test3026: require 'threadsafe'

  Reported-by: Sukanya Hanumanthu
  Fixes #9141
  Closes #9142

- [Even Rouault brought this change]

  CMake: link curl to its dependencies with PRIVATE

  The current PUBLIC visibility causes issues for downstream users.
  Cf https://github.com/OSGeo/PROJ/pull/3172#issuecomment-1157942986

  Reviewed-by: Jakub Zakrzewski
  Closes #9125

- [Even Rouault brought this change]

  CMake: remove APPEND in export(TARGETS)

  When running cmake several times, new content was appended to already
  existing generated files, which is not appropriate

  Reviewed-by: Jakub Zakrzewski
  Closes #9124

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: implement cb_h3_stop_sending and cb_h3_reset_stream callbacks

  Closes #9135

- RELEASE-NOTES: synced

Viktor Szakats (11 Jul 2022)
- build: improve OS string in CMake and `config-win32.h`

  This patch makes CMake fill the "OS string" with the value of
  `CMAKE_C_COMPILER_TARGET`, if passed. This typically contains a triplet,
  the same we can pass to `./configure` via `--host=`.

  For non-CMake, non-autotools, Windows builds, this patch adds the ability
  to override the default `OS` value in `lib/config-win32.h`.

  With these its possible to get the same OS string across the three build
  systems.

  This patch supersedes the earlier, partial, CMake-only solution:
  435f395f3f8c11eebfcc243ca55ebcc11a19b8b8, thus retiring the
  `CURL_OS_SUFFIX` CMake option.

  Reviewed-by: Jay Satiro
  Closes #9117

- Makefile.m32: add `CURL_RC` and `CURL_STRIP` variables [ci skip]

  They allow to override the hardcoded values for the `windres` and `strip`
  tools, complementing the existing set of `CURL_{CC,AR,RANLIB}` variables.

  `CURL_RC` comes handy when using LLVM tools with `CROSSPREFIX=llvm-` and
  `CURL_CC=clang` set on current latest debian:unstable or earlier, where
  `llvm-windres` is missing, and a `CURL_RC=<triplet>-windres` fixes it.
  Hopefully this will be fixed in the llvm package. FWIW `llvm-windres`
  does exist in Homebrew llvm, MSYS2 llvm and llvm-mingw.

  Reviewed-by: Daniel Stenberg
  Closes #9132

Daniel Stenberg (10 Jul 2022)
- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: fix stall or busy loop on STOP_SENDING with upload data

  Fixes #9122
  Closes #9123

- [Xiaoke Wang brought this change]

  tool_operate: better cleanup of easy handle in exit path

  Closes #9114

- [Xiaoke Wang brought this change]

  getinfo: return better error on NULL as first argument

  Closes #9114

- tool_getparam: repair cleanarg

  Regression since 9e5669f.

  Make sure the "cleaning" of command line arguments is done on the
  original argv[] pointers. As a bonus, it also exits better on out of
  memory error.

  Reported-by: Litter White
  Fixes #9128
  Closes #9130

Jay Satiro (10 Jul 2022)
- docs: explain curl_easy_escape/unescape curl handle is ignored

  26101421 (precedes 7.82.0) removed character conversion support used by
  very old legacy operating systems and since then the curl handle passed
  to curl_easy_escape/unescape is always ignored.

  Bug: https://github.com/curl/curl/discussions/9115
  Reported-by: Ted Lyngmo

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

Viktor Szakats (8 Jul 2022)
- openssl: add `CURL_BORINGSSL_VERSION` to identify BoringSSL

  BoringSSL doesn't keep a version number, and doesn't self-identify itself
  via any other revision number via its own headers. We can identify
  BoringSSL revisions by their commit hash. This hash is typically known by
  the builder. This patch adds a way to pass this hash to libcurl, so that
  it can display in the curl version string:

  For example:

  `CFLAGS=-DCURL_BORINGSSL_VERSION="c239ffd0"`

  ```
  curl 7.84.0 (x86_64-w64-mingw32) libcurl/7.84.0 BoringSSL/c239ffd0 (Schannel) zlib/1.2.12 [...]
  Release-Date: 2022-06-27
  Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 [...]
  Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos [...]
  ```

  The setting is optional, and if not passed, BoringSSL will appear without
  a version number, like before this patch.

  Closes #9113

Jay Satiro (8 Jul 2022)
- escape: remove outdated comment

  Bug: https://github.com/curl/curl/discussions/9115
  Reported-by: Ted Lyngmo

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: Fix missing initialization of nghttp3_nv.flags

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

Daniel Stenberg (6 Jul 2022)
- [Brad Forschinger brought this change]

  netrc.d: remove spurious quote

  Closes #9111

Viktor Szakats (6 Jul 2022)
- Makefile.m32: add `NGTCP2_LIBS` option [ci skip]

  Makefile.m32's ngtcp2 has its two libs hardwired for OpenSSL.
  Add `NGTCP2_LIBS` envvar to override them with a custom list,
  making it possible to use BoringSSL, or any other backend.

  Closes #9109

Jay Satiro (6 Jul 2022)
- [Evgeny Grin (Karlson2k) brought this change]

  digest: fix missing increment of 'nc' value for auth-int

  - Increment nc regardless of qop type.

  Prior to this change nc was only incremented for qop type auth even
  though libcurl sends nc with any qop.

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

Daniel Stenberg (5 Jul 2022)
- RELEASE-NOTES: synced

  Bumped to 7.85.0

- urldata: reduce size of four ftp related members

  ftp_filemethod, ftpsslauth and ftp_ccc are now uchars

  accepttimeout is now unsigned int - almost 50 days ought to be enough
  for this value.

  Closes #9106

- urldata: reduce three type-members from int to uchar

   - timecondition
   - proxytype
   - method

  ... previously used their enum type in the struct, which made them
  unnecesarily large.

  Closes #9105

- CURLOPT_SERVER_RESPONSE_TIMEOUT: the new name

  Starting now, CURLOPT_FTP_RESPONSE_TIMEOUT is the alias instead of the
  other way around.

  Since 7.20.0, CURLOPT_SERVER_RESPONSE_TIMEOUT has existed as an alias
  but since the option is for more protocols than FTP the more "correct"
  version of the option is the "server" one so now we switch.

  Closes #9104

- urldata: make 'ftp_create_missing_dirs' a uchar

  It only ever holds the values 0-2.

  Closes #9103

- [Don J Olmstead brought this change]

  cmake: support ngtcp2 boringssl backend

  Update the ngtcp2 find module to detect the boringssl backend. Determine
  if the underlying OpenSSL implementation is BoringSSL and if so use that
  as the ngtcp2 backend.

  Reviewed-by: Jakub Zakrzewski
  Closes #9065

- urldata: change 4 timeouts to unsigned int from long

  They're not used for that long times anyway, 32 bit milliseconds is long
  enough.

  Closes #9101

- urldata: make 'use_netrc' a uchar

  Closes #9102

- urldata: make 'buffer_size' an unsigned int

  It is already capped at READBUFFER_MAX which fits easily in 32 bits.

  Closes #9098

- urldata: remove the unused 'rtspversion' struct member

  Closes #9100

- urldata: make 'use_port' an usigned short

  ... instead of a long. It is already enforced to not attempt to set any
  value outside of 16 bits unsigned.

  Closes #9099

- urldata: store dns cache timeout in an int

  68 years ought to be enough for most.

  Closes #9097

- curl: proto2num: make sure obuf is inited

  Detected by Coverity. CID 1507052.

  Closes #9096

- cookie: use %zu to infof() for size_t values

  Detected by Coverity. CID 1507051
  Closes #9095

Viktor Szakats (4 Jul 2022)
- makefile.m32: add support for custom ARCH [ci skip]

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

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

  Reviewed-by: Daniel Stenberg
  Closes #9092

- cmake: do not force Windows target versions

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

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

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

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

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

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

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

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

- windows: improve random source

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

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

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

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

  - Clear entropy buffer before calling the Windows random generator.

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

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

  Closes #9027

Daniel Stenberg (4 Jul 2022)
- setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR

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

  CURLINFO_PROTCOOL is now deprecated.

  The curl tool is updated to use the new options.

  Added test 1597 to verify the libcurl protocol parser.

  Closes #8992

- digest: simplify a switch() to a simple if

- digest: provide a special bit for "sess" algos

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

  Closes #9079

Jay Satiro (4 Jul 2022)
- [Thomas Weißschuh brought this change]

  select: do not return fatal error on EINTR from poll()

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

  Bug: https://bugs.archlinux.org/task/75201
  Reported-by: Alexandre Bury (gyscos at archlinux)

  Ref: https://github.com/curl/curl/issues/8921
  Ref: https://github.com/curl/curl/pull/8961
  Ref: https://github.com/curl/curl/commit/5912da25#r77584294

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

- [Kai Pastor brought this change]

  cmake: fix build for mingw cross compile

  - Change normaliz lib name to all lowercase.

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

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

- easy_lock: fix build for mingw

  - Define SRWLOCK symbols missing in some mingw environments.

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

Daniel Stenberg (2 Jul 2022)
- tool_progress: avoid division by zero in parallel progress meter

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

- http_aws_sigv4.c: remove two unusued includes

  Closes #9080

- .mailmap: additional edit

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

- RELEASE-NOTES: synced

  bumped to 7.84.1

- [Evgeny Grin (Karlson2k) brought this change]

  .mailmap: updated

- [Evgeny Grin (Karlson2k) brought this change]

  THANKS: merged two entries for Evgeny Grin

  Also updated THANKS-filter file

  Closes #9076

- [Jilayne Lovejoy brought this change]

  lib/curl_path.c: add ISC to license expression

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

  Closes #9073

- [Sean McArthur brought this change]

  hyper: use wakers for curl pause/resume

  Closes #9070

Viktor Szakats (30 Jun 2022)
- Makefile.m32: do not set the libcurl.rc debug flag [ci skip]

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

  Reviewed-by: Jay Satiro
  Closes #9069

Daniel Stenberg (29 Jun 2022)
- curl.h: CURLE_CONV_FAILED is obsoleted

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

  Closes #9067

- curl: output warning when a cookie is dropped due to size

  Dropped from the request, that is.

  Closes #9064

- curl_mime_data.3: polish the wording

  Closes #9063

- configure: check for the stdatomic.h header in configure

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

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

- easy_lock: fix the #ifdef conditional for ia32_pause

  To work better with new and old clang compilers.

  Reported-by: Ryan Schmidt
  Assisted-by: Joshua Root

  Fixes #9058
  Closes #9062

- easy_lock: switch to using atomic_int instead of bool

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

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

- [vvb2060 brought this change]

  ngtcp2: fix incompatible function pointer types

  Closes #9056

- [vvb2060 brought this change]

  easy_lock.h: use __asm__ instead of asm to fix build

  Closes #9056

- [Samuel Henrique brought this change]

  libcurl-security.3: fix typo on macro "SH_"

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

  Closes #9057

- easy_lock.h: include sched.h if available to fix build

  Patched-by: Harry Sintonen

  Closes #9054

Version 7.84.0 (27 Jun 2022)

Daniel Stenberg (27 Jun 2022)
- RELEASE-NOTES: synced

  Version 7.84.0 release

- THANKS: contributors from 7.84.0 release notes

- hsts: use Curl_fopen()

- altsvc: use Curl_fopen()

- fopen: add Curl_fopen() for better overwriting of files

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

- test444: test many received Set-Cookie:

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

- test442/443: test cookie caps

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

- cookie: apply limits

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

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

- test387: verify rejection of compression chain attack

- content_encoding: return error on too many compression steps

  The max allowed steps is arbitrarily set to 5.

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

- krb5: return error properly on decode errors

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

- easy_lock.h: remove use of the deprecated ATOMIC_VAR_INIT macro

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

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

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

- [Stefan Eissing brought this change]

  ngtcp2: avoid supplying 0 length `msg_control` to sendmsg()

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

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

  Closes #9039

- [Tom Eccles brought this change]

  ftp: restore protocol state after http proxy CONNECT

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

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

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

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

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

  Fixes #8737
  Closes #9043

Jay Satiro (23 Jun 2022)
- THANKS: add contributor missing from aea8ac1

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

- curl_setup: include _mingw.h

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

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

Viktor Szakats (22 Jun 2022)
- rand: stop detecting /dev/urandom in cross-builds

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

  Reviewed-by: Daniel Stenberg
  Closes #9038

Daniel Stenberg (22 Jun 2022)
- [Emanuele Torre brought this change]

  ci: avoid `cmake -Hpath`

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

  Fixes #9008
  Closes #9014

- INTERNALS: bring back the "Library symbols" section

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

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

Viktor Szakats (22 Jun 2022)
- Makefile.m32: stop forcing XP target with ipv6 enabled [ci skip]

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

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

  [1] 98a61d8e2e8982786aaf3916cbbcac96838316e7

  Closes #9035

Daniel Stenberg (21 Jun 2022)
- CONTRIBUTE: mention how we maintain REUSE compliance

  for copyright and license information of all files stored in git

  Closes #9032

- CURLOPT_ALTSVC.3: document the file format

  Closes #9033

Jay Satiro (21 Jun 2022)
- runtests: add "threadsafe" to detected features

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

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

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

Daniel Stenberg (20 Jun 2022)
- easy: remove dead code

  Follow-up from 5912da253b64d

  Detected by Coverity (CID 1506519)

  Closes #9029

- [Glenn Strauss brought this change]

  transfer: upload performance; avoid tiny send

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

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

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

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

- [Steve Holme brought this change]

  projects: fix third-party SSL library build paths for Visual Studio

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

  Closes #8991

- [Pierrick Charron brought this change]

  urlapi: make curl_url_set(url, CURLUPART_URL, NULL, 0) clear all parts

  As per the documentation :

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

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

  Closes #9028

- [Philip H brought this change]

  CI: bump FreeBSD 13.0 to 13.1

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

- RELEASE-NOTES: synced

  and updated release date in RELEASE-PROCEDURE.md

- [divinity76 brought this change]

  CURLOPT_HTTPHEADER.3: improve comment in example

  Closes #9025

Marc Hoersken (16 Jun 2022)
- CI/azure: reduce flakiness by retrying install/prepare steps

  Closes #9010

- CI/cirrus: align Windows timeout with Azure CI at 120 minutes

  Closes #9009

Jay Satiro (16 Jun 2022)
- vtls: make curl_global_sslset thread-safe

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

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

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

- curl_easy_pause.3: remove explanation of progress function

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

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

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

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

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

Daniel Stenberg (15 Jun 2022)
- libssh: skip the fake-close when libssh does the right thing

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

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

- configure: warn about rustls being experimental

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

  Closes #9019

- runtests: skip starting the ssh server if user name is lacking

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

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

- copyright.pl: parse and use .reuse/dep5 for skips

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

  Closes #9006

- reuse/dep5: adjusted to parse better

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

  Closes #9006

- buildconf.bat: update copyright year range

  Closes #9006

- README.md: use the common "Copyright" style formatting

  Closes #9006

- reuse: move license info from .mailmap.license to .reuse/dep5

  Closes #9006

- README.md: add a REUSE badge

  Closes #9004

- .reuse/dep5: remove recursive docs ignore, only skip markdown files

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

  Closes #9005

- docs/cmdline-opts: add copyright and license identifier to each file

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

  Closes #9002

- copyright: info for/ignore .github/ISSUE_TEMPLATE/bug_report.md

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

  Closes #9001

- bug_report.md: revert the REUSE template to see if it works again

Viktor Szakats (13 Jun 2022)
- version: rename threadsafe-init to threadsafe

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

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

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

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

Daniel Stenberg (13 Jun 2022)
- test3026: disable on win32

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

  Closes #8996

- GHA: shorten the reuse CI job name

  "REUSE compliance / check" should be good enough

  Closes #9000

- misc: add missing SPDX-License-Identifier info

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

  Closes #8999

- copyright: verify SPDX-License-Identifier presence as well

- easy_lock: add SPDX license identifier

  Closes #8998

- mailmap: Max Mehl

- [Max Mehl brought this change]

  git: ignore large commit making the curl REUSE compliant

- [Max Mehl brought this change]

  copyright: make repository REUSE compliant

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

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

  Closes #8869

- curl_url_set.3: clarify by default using known schemes only

  Closes #8994

- scripts/copyright.pl: ignore leading spaces

Viktor Szakats (10 Jun 2022)
- ngtcp2: fix typo in preprocessor condition

  Ref: 927ede7edcb7b05b8e8bbf9ced6aed523ae594a7

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

Daniel Stenberg (10 Jun 2022)
- RELEASE-NOTES: synced

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: build without sendmsg

  Closes #8981

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: use handshake helper funcs to simplify TLS handshake integration

  Closes #8968

- test390: verify --parallel

  Closes #8985

- test1543: verify CURLINFO_EFFECTIVE_URL with CURLOPT_CURLU set

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

  Closes #8971

- url: URL encode the path when extracted, if spaces were set

- urlapi: support CURLU_URLENCODE for curl_url_get()

- server/sws: support spaces in the HTTP request path

- tests/getpart: fix getpartattr to work with "data" and "data2"

- select: return error from "lethal" poll/select errors

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

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

- test3026: add missing control file

  Follow-up from 2ed101256414ea5

  Makes the test run, makes 'make dist' work

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

  Closes #8976

- runtests: fix skipping tests not done event-based

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

  Closes #8977

- transfer: maintain --path-as-is after redirects

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

- test391: verify --path-as-is with redirect

Jay Satiro (8 Jun 2022)
- curl_global_init.3: Separate the Windows loader lock warning

  This is a slight correction of the parent commit which implied the
  loader lock warning only applied if not thread-safe. In fact the loader
  lock warning applies either way.

  Ref: https://github.com/curl/curl/pull/8972#discussion_r891987030

Daniel Stenberg (8 Jun 2022)
- curl_global_init.3: this is now (usually) thread-safe

  Follow-up to 23af112f5556

  Closes #8972

Jay Satiro (8 Jun 2022)
- [Haxatron brought this change]

  libcurl-security.3: Document CRLF header injection

  - Document that user input to header options is not sanitized, which
    could result in CRLF used to modify the request in a way other than
    what was intended.

  Ref: https://hackerone.com/reports/1589877
  Ref: https://medium.com/@tomnomnom/crlf-injection-into-phps-curl-options-e2e0d7cfe545

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

- CURLOPT_RANGE.3: remove ranged upload advice

  The e-mail link in the advice contains instructions that are prone to
  error. We need an example that works and can demonstrate how to properly
  perform a ranged upload, and then we can refer to that example instead.

  Bug: https://github.com/curl/curl/issues/8969
  Reported-by: Simon Berger

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

Daniel Stenberg (7 Jun 2022)
- [Thomas Guillem brought this change]

  curl_version_info: add CURL_VERSION_THREADSAFE_INIT

  This flag can be used to make sure that curl_global_init() is
  thread-safe.

  This can be useful for libraries that can't control what other
  dependencies are doing with Curl.

  Closes #8680

- [Thomas Guillem brought this change]

  lib: make curl_global_init() threadsafe when possible

  Use a posix pthread or a Windows SRWLOCK to lock curl_global_init*() and
  curl_global_cleanup().

  Closes #8680

- RELEASE-NOTES: synced

- [Fabian Keil brought this change]

  test414: add the '--resolve' keyword

  ... so the test can be automatically skipped when
  using an external proxy like Privoxy.

  Closes #8959

- [Fabian Keil brought this change]

  test{440,441,493,977}: add "HTTP proxy" keywords

  ... so the tests can be automatically skipped when
  using an external proxy like Privoxy.

  Closes #8959

- [Fabian Keil brought this change]

  runtests.pl: add the --repeat parameter to the --help output

  Closes #8959

- [Fabian Keil brought this change]

  test 2081: add a valid reply for the second request

  ... so the test works when using a HTTP proxy like
  Privoxy that sends an error message if the server
  doesn't send data.

  Closes #8959

- [Fabian Keil brought this change]

  test 675: add missing CR so the test passes when run through Privoxy

  Closes #8959

- ftp: when failing to do a secure GSSAPI login, fail hard

  ... instead of switching to cleartext. For the sake of security.

  Reported-by: Harry Sintonen
  Bug: https://hackerone.com/reports/1590102
  Closes #8963

- http2: reject overly many push-promise headers

  Getting more than a thousand of them is rather a sign of some kind of
  attack.

  Reported-by: Harry Sintonen
  Bug: https://hackerone.com/reports/1589847
  Closes #8962

- [Fabian Keil brought this change]

  misc: spelling improvements

  Closes #8956

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: fix assertion failure on EMSGSIZE

  Closes #8958

- easy/transfer: fix cookie-disabled build

  Follow-up from 45de940cebf6a
  Reported-by: Marcel Raad
  Fixes #8953
  Closes #8954

- examples/crawler.c: use the curl license

  With permission from Jeroen Ooms

  URL: https://github.com/curl/curl/pull/8869#issuecomment-1144742731
  Closes #8950

- speed-limit/time.d: mention these affect transfers in either direction

  Reported-by: Ladar Levison
  Fixes #8948
  Closes #8951

- scripts/copyright.pl: fix the exclusion to not ignore man pages

  Ref: #8869
  Closes #8952

- examples: remove fopen.c and rtsp.c

  To simplify the license situation, as they were the only files in the
  source tree using these specific BSD-3 clause licenses.

  For an fopen style API, we recommend instead going
  https://github.com/curl/fcurl

  Ref: #8869
  Closes #8949

- [Wolf Vollprecht brought this change]

  netrc: check %USERPROFILE% as well on Windows

  Closes #8855

- CURLOPT_SSH_HOSTKEYDATA/FUNCTION.3: minor polish

- [michael musset brought this change]

  libssh2: add CURLOPT_SSH_HOSTKEYFUNCTION

  The callback set by CURLOPT_SSH_HOSTKEYFUNCTION is called to check
  wether or not the connection should continue.

  The host key is passed in argument with a custom handle for the
  application.

  It overrides CURLOPT_SSH_KNOWNHOSTS

  Closes #7959

- docs/CONTRIBUTE.md: document the 'needs-votes' concept

  A pull request sent to the project might get labeled `needs-votes` by a
  project maintainer. This label means that in addition to meeting all
  other checks and qualifications this pull request must also receive
  proven support/thumbs-ups from more community members to be considered
  for merging.

  Closes #8910

- [Evgeny Grin (Karlson2k) brought this change]

  digest: tolerate missing "realm"

  Server headers may not define "realm", avoid NULL pointer dereference
  in such cases.

  Closes #8912

- [Evgeny Grin (Karlson2k) brought this change]

  digest: added detection of more syntax error in server headers

  Invalid headers should not be processed otherwise they may create
  a security risk.

  Closes #8912

- [Evgeny Grin (Karlson2k) brought this change]

  digest: unquote realm and nonce before processing

  RFC 7616 (and 2617) requires values to be "unquoted" before used for
  digest calculations. The only place where unquoting can be done
  correctly is header parsing function (realm="DOMAIN\\host" and
  realm=DOMAN\\host are different realms).

  This commit adds unquoting (de-escaping) of all values during header
  parsing and quoting of the values during header forming. This approach
  should be most straightforward and easy to read/maintain as all values
  are processed in the same way as required by RFC.

  Closes #8912

- headers: handle unfold of space-cleansed headers

  Detected by OSS-fuzz

  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47767

  Updated test 1274

  Closes #8947

- lib: make more protocol specific struct fields #ifdefed

  ... so that they don't take up space if the protocols are disabled in
  the build.

  Closes #8944

- DISABLED: disable 1021 for hyper again

  due to flakiness in the CI builds

- urldata: store tcp_keepidle and tcp_keepintvl as ints

  They can't be set larger than INT_MAX in the setsocket API calls.

  Also document the max values in their respective man pages.

  Closes #8940

- urldata: reduce size of a few struct fields

  When the values are never larger than 32 bit, ints are better than longs.

  Closes #8940

- urldata: remove three unused booleans from struct UserDefined

  - is_fwrite_set
  - free_referer
  - strip_path_slash

  Closes #8940

- remote-name.d: mention --output-dir

  plus add two see-alsos

  Closes #8945

Jay Satiro (1 Jun 2022)
- configure: skip libidn2 detection when winidn is used

  Prior to this change --with-winidn could be overridden by libidn2
  detection.

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

Daniel Stenberg (31 May 2022)
- CURLOPT_FILETIME.3: fix the protocols this works with

- test681: verify --no-remote-name

  Follow-up to 83ee5c428d960 (from #8931)

  Closes #8942

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: enable Linux GSO

  Enable Linux GSO in ngtcp2 QUIC.  In order to recover from the
  EAGAIN/EWOULDBLOCK by sendmsg with multiple packets in one GSO write,
  packet buffer is now held by struct quicsocket.  GSO write might fail in
  runtime depending on NIC.  Disable GSO if sendmsg returns EIO.

  Closes #8909

- CURLOPT_PORT.3: We discourage using this option

  Closes #8941

- RELEASE-NOTES: synced

- headers_push: error out if a folded header has no previous header

  As that would indicate an illegal header. The fuzzer reached the assert
  in unfold_value() proving that this case can happen.

  Follow-up to c9b60f005358a364

  Closes #8939

- [Boris Verkhovskiy brought this change]

  curl: re-enable --no-remote-name

  Closes #8931

- test680: require 'http' since it uses such a URL

  Follow-up to d1b376c03524

- CURLOPT_NETRC.3: document the .netrc file format

- test680: verify rejection of malformatted .netrc quoted password

- test679: verify netrc quoted string

- netrc: support quoted strings

  The .netrc parser now accepts strings within double-quotes in order to
  deal with for example passwords containing white space - which
  previously was not possible.

  A password that starts with a double-quote also ends with one, and
  double-quotes themselves are escaped with backslashes, like \". It also
  supports \n, \r and \t for newline, carriage return and tabs
  respectively.

  If the password does not start with a double quote, it will end at first
  white space and no escaping is performed.

  WARNING: this change is not entirely backwards compatible. If anyone
  previously used a double-quote as the first letter of their password,
  the parser will now get it differently compared to before. This is
  highly unfortunate but hard to avoid.

  Reported-by: ImpatientHippo on GitHub
  Fixes #8908
  Closes #8937

- curl_getdate.3: document that some illegal dates pass through

  Closes #8938

- CI: remove configure --enable-headers-api flags

- headers api: remove EXPERIMENTAL tag

  Closes #8900

Daniel Gustafsson (30 May 2022)
- cookies: fix documentation comment

  Commit 4073cd83b2 added the noexpire parameter to Curl_cookie_add but
  missed updating the documentation comment at the head of the file.

Daniel Stenberg (30 May 2022)
- [Marc Hoersken brought this change]

  tests/data/test1940: use binary mode for expected stdout

  The generated stdout data is written in binary mode with [LF]
  line endings, therefore we also need to do a binary comparison.

  Assisted-by: Jay Satiro
  Assisted-by: Daniel Stenberg

  Follow up to c9b60f005358a364cbcddbebd8d12593acffdd84
  Fixes #8920
  Closes #8936

- CURLINFO_CAINFO/PATH.3: clarify the multiple TLS situation

  Spell out the multi-TLS situation.

  Reported-by: Dan Fandrich
  Fixes #8926
  Closes #8932

Jay Satiro (28 May 2022)
- [JustAnotherArchivist brought this change]

  tool_getparam: fix --parallel-max maximum value constraint

  - Clamp --parallel-max to MAX_PARALLEL (300) instead of resetting to
    default value.

  Previously, --parallel-max 300 would use 300 concurrent transfers, but
  --parallel-max 301 would unexpectedly use only 50. This change clamps
  higher values to the maximum (ie --parallel-max 301 would use 300).

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

Daniel Stenberg (27 May 2022)
- curl.1: add a few see also --tls-max

  Closes #8929

Viktor Szakats (26 May 2022)
- cmake: do not add libcurl.rc to the static libcurl library

  Fixes: https://github.com/curl/curl/pull/8918#issuecomment-1138263855

  Reviewed-By: Karlson2k@users.noreply.github.com
  Closes #8923

- cmake: support adding a suffix to the OS value

  CMake automatically uses the `CMAKE_SYSTEM_NAME` value to fill the OS
  string appearing in the --version output after the curl version number,
  for example:

    'curl 7.83.1 (Windows)'

  This patchs adds the ability to pass a suffix that is appended to this
  value. It's useful to add CPU info or other platform details,
  for example:

    'curl 7.83.1 (Windows-x64)'

  Closes #8919

- cmake: enable curl.rc for all Windows targets

  Before this patch, it was only enabled for MSVC. This syncs this
  configuration with libcurl.rc, which was already included with
  every Windows compiler.

  Closes #8918

- cmake: fix detecting libidn2

  Without this patch, libidn2 detection doesn't even seem to be
  attempted. With this patch, cmake can be configured to pick it
  up and enable it. Necessary configuration remains manual and
  differs from most other dependencies.

  If you are aware of a better fix, we're glad hearing about it
  in a new Issue.

  Closes #8917

- version: allow stricmp() for sorting the feature list

  In CMakeLists.txt there is an attempt to detect `stricmp()`, and in
  certain cases, this attempt is the only successful one to detect a
  case-insensitive comparison function. `HAVE_STRICMP` is defined as
  a result, but this macro wasn't used anywhere in the source. This
  patch makes use of it as an alternative when alpha-sorting the
  `--version` feature list.

  Reviewed-by: Daniel Stenberg
  Closes #8916

Daniel Stenberg (25 May 2022)
- DISABLED: add six tests that fail with hyper

  1117 1274 1940 1941 1942 1943

- c-hyper: mark status line as status for Curl_client_write()

  To make sure the headers API can filter it out as not a regular header.

  Reported-by: Gisle Vanem
  Fixes #8894
  Closes #8914

Marc Hoersken (25 May 2022)
- tests/data/test1501: kill ftp server after slow LIST response

  This test is contributing to flakiness on the Windows CI runs.
  Killing the ftp server after the test run like other slowness
  tests already do may help resolve or reduce the flakiness.

  Closes #8907

Daniel Stenberg (25 May 2022)
- headers: fix the unfold realloc to use proper new size

  Previously it didn't take the old name length into acount

  Follow-up to: c9b60f005358a364
  Closes #8913

Marc Hoersken (25 May 2022)
- GHA: align all install, configure and build steps again

  First step towards more unified build steps on GitHub Actions.

  Closes #8873

- CI/azure: remove obsolete strategy for single builds

  This shortens these CI job names on GitHub even more.
  Follow up to #8906 which also increased their timeout.

  Closes #8911

- CI/azure: shorten names of Windows CI jobs

  Suggested-by: Daniel Stenberg
  Closes #8906

Daniel Stenberg (24 May 2022)
- http: restore header folding behavior

  Folded header lines will now get passed through like before. The headers
  API is adapted and will provide the content unfolded.

  Added test 1274 and extended test 1940 to verify.

  Reported-by: Petr Pisar
  Fixes #8844
  Closes #8899

Viktor Szakats (24 May 2022)
- Makefile.m32: delete obsolete options, improve -On [ci skip]

  - `-D_AMD64_` has not been necessary for mingw-w64 builds for a long time now.
  - `-fno-strict-aliasing` is mentioned for Intel C compiler in autotools, and
    I used this with VxWorks in another project, but otherwise this isn't
    necessary anymore as a default. If a target still needs it, it can be
    added with `CURL_CFLAG_EXTRAS=-fno-strict-aliasing`
  - bump up default optimization level to `-O3` (from `-O2`), and also rearrange
    option order so the default can now be overridden via
    `CURL_CFLAG_EXTRAS`.
  - delete `-g` (generate debug info) from `CFLAGS` and `-s` from `LDFLAGS`
    (strip debug info). They were working against each other. Now, if someone
    needs debug info, it can be enabled via `CURL_CFLAG_EXTRAS=-g`

  Closes #8904

Daniel Gustafsson (24 May 2022)
- ntlm: fix one more hostname test fallout

  This fixup was missed in commit 5a41abef6dca19.

  Closes: #8901
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- doh: remove UNITTEST macro definition

  The UNITTEST macro is defined by curl_setup.h so there is no use in
  carry a local copy of the logic.

  Closes: #8902
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (24 May 2022)
- cookie: fix false positive "potentially uninitialized local variable"

  Reviewed-by: Daniel Gustafsson
  Closes #8903

- curl: add --rate to set max request rate per time unit

  --rate "12/m" - for 12 per minute or
  --rate "5/h" - for 5 per hour

  Removed from TODO

  Closes #8671

- [Jay Satiro brought this change]

  max-time.d: clarify max-time sets max transfer time

  Prior to this change the doc said --max-time set the maximum time of the
  'whole operation' which is not accurate. The option maps to
  CURLOPT_TIMEOUT_MS which sets maximum transfer time.

  For example, the maximum time on a transfer is reset if the transfer is
  retried (--retry).

  Reported-by: Nuru@users.noreply.github.com

  Fixes https://github.com/curl/curl/issues/8877
  Closes #8879

- GHA/hyper: enable debug in the build

- hyper: use 'alt-used'

  Makes test 412+413 work

  Closes #8898

- RELEASE-NOTES: synced

- CURLINFO_CAPATH/CAINFO: get the default CA paths from libcurl

  Closes #8888

- links: update dead links

  The wiki pages are gone, remove and link to more long-living docs.

  Closes #8897

- ntlm: (void) typecast msnprintf() where we ignore return code

  Follow-up to 5a41abef6, to please Coverity

Daniel Gustafsson (22 May 2022)
- ntlm: copy NTLM_HOSTNAME to host buffer

  Commit 709ae2454f43 added a fake hostname to avoid leaking the local
  hostname, but omitted copying it to the host buffer.  Fix by copying
  and adjust the test fallout.

  Closes: #8895
  Fixes: #8893
  Reported-by: Patrick Monnerat <patrick@monnerat.net>
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- configure: use the SED value to invoke sed

  Rather than assuming sed in PATH, use the resolved $SED variable
  like in all other invocations of sed in configure.

  Closes: #8891
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
  Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>

Daniel Stenberg (20 May 2022)
- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: Allow curl to send larger UDP datagrams

  Allow curl to send larger UDP datagram if Path MTU Discovery finds the
  availability of larger path MTU.  To make it work and not to send
  fragmented packet, we need to set DF bit.  That makes send(2) fail with
  EMSGSIZE if UDP datagram is too large.  In that case, just let it be
  lost.  This patch enables DF bit for Linux only.

  Closes #8883

- libcurl-security.3: add "Secrets in memory"

  Closes #8881

- tests: update NTLM tests to use new host name

  Also drop the debug requirement, remove the setenv sections, remove
  prechecks and add NTLM to the top keywords.

  Closes #8889

- ntlm: provide a fixed fake host name

  The NTLM protocol includes providing the local host name, but apparently
  other implementations already provide a fixed fake name instead to avoid
  leaking the real local name.

  The exact name used is 'WORKSTATION', because Firefox uses that.

  The change is written to allow someone to "back-pedal" fairly easy in
  case of need.

  Reported-by: Carlo Alberto
  Fixes #8859
  Closes #8889

Daniel Gustafsson (20 May 2022)
- KNOWN_BUGS: fix typo in problem description

  s/TSL/TLS/

- FEATURES: remove yassl as TLS library for NTLM

  yassl was added in commit 9d904ee41b880b but is no longer available
  and is thus not a library to use for NTLM. This aligns the FEATURES
  doc with the FAQ.

  Closes: #8886
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- FEATURES: reorder footnotes

  The empty left-behind footnote confused the website rendering into
  creating a nested emoty list, making the resulting page look quite
  odd.  Remove and re-order the remaining ones to avoid a gap in the
  sequence.

  Closes: #8886
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- FAQ: remove opinionated sentence on NTLM

  curl is a tool that support many different things, and it doesn't
  really seem like our job to tell other what to use (as they might
  not have much say in the matter even).  Also tidy up wording.

  Closes: #8886
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Viktor Szakats (20 May 2022)
- log2changes: do not indent empty lines [ci skip]

  This will omit two spaces of indentation from lines with no content,
  thus avoiding 'spaces @ EOL'.

  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
  Closes #8887

Daniel Stenberg (19 May 2022)
- wolfssl: correct the failf() message when a handle can't be made

  Closes #8885

Viktor Szakats (19 May 2022)
- Makefile.m32: delete two obsolete OpenSSL options [ci skip]

  - -DOPENSSL_NO_KRB5: No longer used by OpenSSL 1.1.x, 3.x, or
    LibreSSL 3.5.x, yet it collides with the latter, which defines
    it unconditionally, resulting in this warning:
      ../../libressl/include/openssl/opensslfeatures.h:14:9: warning: 'OPENSSL_NO_KRB5' macro redefined [-Wmacro-redefined]
    It was originally added to curl in 2004.

  - -DHAVE_OPENSSL_PKCS12_H: No longer used by OpenSSL 1.1.x, 3.x, or
    LibreSSL back to at least 2.5.5. Originally added in the same
    commit as the above, in 2004.

  Closes #8884

Daniel Stenberg (19 May 2022)
- RELEASE-NOTES: synced

  bump to 7.84.0

- [Christian Weisgerber via curl-library brought this change]

  Makefile.am: fix portability issues

  Commit a04f0b961333e1a19848d073d8c7db9c20b2a371 made me notice that
  there is a portability issue in curl's top-level Makefile.am.

  $< can only be used in rules that deal with .SUFFIXES.  Its use
  for general prerequisites is a GNU make extension.

  $< could be replaced by $?, but I think in an autotools context,
  something like this is better:

  Bug: https://curl.se/mail/lib-2022-05/0024.html
  Closes #8861

- [Balakrishnan Balasubramanian brought this change]

  socks: support unix sockets for socks proxy

  Usage:
    curl -x "socks5h://localhost/run/tor/socks" "https://example.com"

  Updated runtests.pl to run a socksd server listening on unix socket

  Added tests test1467 test1468

  Added documentation for proxy command line option and socks proxy
  options

  Closes #8668

- [Vincent Torri brought this change]

  cmake: add libpsl support

  Fixes #8865
  Closes #8867

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: extend QUIC transport parameters buffer

  Extend QUIC transport parameters buffer because 64 bytes are too
  short for the ever increasing parameters.

  Closes #8872

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: handle error from ngtcp2_conn_submit_crypto_data

  Closes #8871

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: send appropriate connection close error code

  Closes #8870

- test1561: adjusted for the cookie fix

- test414: verify secure cookie domain overlay

- [Harry Sintonen brought this change]

  cookie: address secure domain overlay

  Bug: https://hackerone.com/reports/1560324
  Co-authored-by: Daniel Stenberg
  Closes #8840

- [Frank Gevaerts brought this change]

  strcase: some optimisations

  Lookup tables for toupper() and tolower() make Curl_strcasecompare()
  about 1.5 times faster. Reorganising Curl_strcasecompare() to fully exit
  early then also allows simplifying the check at the end, for another
  15%. In total, the changes make Curl_strcasecompare() around 1.6 to 1.7
  times faster.

  Note that these optimisation assume ASCII. The original
  Curl_raw_toupper() and raw_tolower() look like they already made that
  assumption.

  Closes #8875

- BUG-BOUNTY.md: mention the audit exception

  Dedicated - paid for - security audits that are performed in
  collaboration with curl developers are not eligible for bounties.

  (plus I changed the sub-titles to use ## instead of # in the markdown)

  Closes #8880

- lib/vssh/wolfssh.h: removed

  Unused header file

  Reported-by: Illarion Taev
  Fixes #8863
  Closes #8866

- [Elms brought this change]

  wolfSSL: explicitly use compatibility layer

  This change removes adding an include `$prefix/wolfssl` or similar to
  allow for openssl include aliasing. Include paths of `wolfssl/openssl/`
  are used to explicitly use wolfSSL includes. This fixes cmake builds as
  well as avoiding potentially using openSSL headers since include path
  order is not guaranteed.

  Closes #8864

- curl: deprecate --random-file and --egd-file

  As libcurl no longer has any functionality for them, the tool now does
  nothing with them.

  Closes #8670

- opts: deprecate RANDOM_FILE and EGDSOCKET

  These two options were only ever used for the OpenSSL backend for
  versions before 1.1.0. They were never used for other backends and they
  are not used with recent OpenSSL versions. They were never used much by
  applications.

  The defines RANDOM_FILE and EGD_SOCKET can still be set at build-time
  for ancient EOL OpenSSL versions.

  Closes #8670

- [Harry Sintonen brought this change]

  bindlocal: don't use a random port if port number would wrap

  Earlier if CURLOPT_LOCALPORT + CURLOPT_LOCALPORTRANGE would go past port
  65535 the code would fall back to random port rather than giving up.

  Closes #8862

Daniel Gustafsson (16 May 2022)
- transfer: Fix potential NULL pointer dereference

  Commit 0ef54abf5208 accidentally used the conn variable before the
  assertion for it being NULL. Fix by moving the assignment which use
  conn to after the assertion.

  Closes: #8857
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- docs: clarify data replacement policy for MIME API

  The API documentation for the MIME functions specify that the parts
  can be set twice, with the last call winning.  While true, the user
  can set the parts n times for n > 2, reword to specify multiple API
  calls instead.

  Closes: #8860
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (16 May 2022)
- [vvb2060 on github brought this change]

  ngtcp2: support boringssl crypto backend

  Closes #8789

- [Tatsuhiro Tsujikawa brought this change]

  quic: add Curl_quic_idle

  Add Curl_quic_idle which is called when no HTTP level read or write is
  performed.  It is a good place to handle timer expiry for QUIC transport
  (.e.g, retransmission).

  Closes #8698

- [Gregor Jasny brought this change]

  mprintf: ignore clang non-literal format string

  Closes #8740

- [Nick Zitzmann brought this change]

  sectransp: check for a function defined when __BLOCKS__ is undefined

  SecTrustEvaluateAsync() is defined in the macOS 10.7 SDK, but it
  requires Grand Central Dispatch to be supported by the compiler, and
  some third-party macOS compilers do not support Grand Central Dispatch.
  SecTrustCopyPublicKey() is not present in macOS 10.6, so this shouldn't
  adversely affect anything.

  Fixes #8846
  Reported-by: Egor Pugin
  Closes #8854

Daniel Gustafsson (16 May 2022)
- test412/413: Use version macro for User-Agent

  Commit 46d45ea3a incorrectly hardcoded the User-Agent in the test
  output file which breaks when curlver is updated. Shift to using
  the %VERSION macro instead.

  Closes: #8856

- macos9: remove partial support

  The support for compiling on Mac OS 9 hasn't been modified since 2001
  and has no active maintainer or packager, so it's time to remove it as
  it's incredibly unlikely to work. If a maintainer re-emerges it can be
  resurrected from Git history.

  Closes: #8836
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (16 May 2022)
- test1635: verify --fail-with-body with --retry

  Almost a dupe of 1634

  Closes #8847

- tool_operate: make sure --fail-with-body works with --retry

  ... in the same way --fail already does.

  Reported-by: Jakub Bochenski
  Fixes #8845
  Closes #8847

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: Correct use of ngtcp2 and nghttp3 signed integer types

  Closes #8851

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: Fix alert_read_func return value

  Closes #8852

- [Harry Sintonen brought this change]

  Curl_parsenetrc: don't access local pwbuf outside of scope

  Accessing local variables outside of the scope is forbidden and
  depending on the compiler can result in the value being
  overwritten. Fixed by moving the pwbuf to be in scope.

  Closes #8850

- RELEASE-NOTES: synced

  and bump curlver to 7.83.2 for now (but likely to become 7.84.0 soon)

- [Frazer Smith brought this change]

  ci: update github actions

  - bump actions/checkout from 2 to 3
  - bump actions/upload-artifact from 1 to 3
  - bump github/codeql-actions from 1 to 2
  - use version tag for actions/checkout

  Closes #8843

- test1919: verify CURLOPT_XOAUTH2_BEARER leak fix

- url: free old conn better on reuse

  Make use of conn_free() better and avoid duplicate code.

  Reported-by: Andrea Pappacoda
  Fixes #8841
  Closes #8842

Jay Satiro (14 May 2022)
- FAQ: Clarify Windows double quote usage

  - Windows command prompt doesn't use literal quoting via single quotes.

  - Windows command prompt inner double quotes are escaped with a
    backslash.

  - Windows powershell does use single quotes but curl is not a powershell
    script so the arguments may not be passed on correctly.

  - Windows powershell inner double quotes seems can be passed to curl if
    the outer quotes are double quotes and an escape of backslash-backtick
    is used.

  Command prompt example:

  ~~~
  getargs -v -d "\"a\""

  argv[0]: getargs
  argv[1]: -v
  argv[2]: -d
  argv[3]: "a"
  ~~~

  Ref: https://github.com/curl/curl/issues/8818
  Ref: https://gist.github.com/jay/19aba48653bd591cf4b90eb9249a302c

  Reported-by: KotlinIsland@users.noreply.github.com

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

Daniel Stenberg (12 May 2022)
- github/workflows/nss: apt update first

  Fix "libnss3-dev_3.49.1-1ubuntu1.6_amd64.deb 404 Not Found"

  Closes #8837

- page-footer: mention exit code zero too

  Success (zero) is also an "exit code" worth mentioning.

  Closes #8833

Daniel Gustafsson (12 May 2022)
- gssapi: initialize gss_buffer_desc strings

  Explicitly initialize gss_buffer_desc strings such that a call to
  freeing resources will succeed even if no data has been allocated
  to it.

  Reported-by: Jay Satiro <raysatiro@yahoo.com>

- gssapi: improve handling of errors from gss_display_status

  In case gss_display_status() returns an error, avoid trying to add
  it to the buffer as the message may well be a NULL pointer.

  Originally this fix comes from a discussion in issue #8816.

  Closes: #8832
  Reviewed-by: Jay Satiro <raysatiro@yahoo.com>

Jay Satiro (12 May 2022)
- [steini2000 brought this change]

  http2: always debug print stream id in decimal with %u

  Prior to this change the stream id shown could be hex or decimal which
  was inconsistent and confusing.

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

Kamil Dudka (11 May 2022)
- url: remove redundant #ifdefs in allocate_conn()

  No change in behavior intended by this commit.

Daniel Stenberg (11 May 2022)
- [Fabian Keil brought this change]

  tests 266, 116 and 1540: add a small write delay

  This makes it more likely that the trailer is received
  seperately from the last-chunk.

  curl doesn't seem to care about this but it makes the tests
  more useful when testing external proxies like Privoxy.

- [Fabian Keil brought this change]

  tests 1117,1238,1523: adjust writedelay servercmds

  ... so the delays are the same now that the unit
  is in milliseconds.

- [Fabian Keil brought this change]

  tests/server/sws.c: change the HTTP writedelay unit to milliseconds

  This allows to use write delays for large responses without
  resulting in the test taking an unreasonable amount of time.

  In many cases delaying writes by a whole second or more isn't
  necessary for the desired effect.

  Closes #8827

Daniel Gustafsson (11 May 2022)
- aws-sigv4: fix potentional NULL pointer arithmetic

  We need to check if the strchr() call returns NULL (due to missing
  char) before we use the returned value in arithmetic.  There is no
  live bug here, but fixing it before it can become for hygiene.

  Closes: #8814
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (11 May 2022)
- quiche: support ca-fallback

  Follow-up to b01f3e679f4c1ea3 which added this for ngtcp2/openssl

  Removed from KNOWN_BUGS

  Fixes #8696
  Closes #8830

Daniel Gustafsson (11 May 2022)
- x509asn1: mark msnprintf return as unchecked

  We have lots of unchecked msnprintf calls, and this particular msnprintf
  call isn't more interesting than the others, but this one yields a Coverity
  warning so let's implicitly silence it. Going over the other invocations
  is probably a worthwhile project, but for now let's keep the static
  analyzers happy.

  Closes: #8831
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Version 7.83.1 (11 May 2022)

Daniel Stenberg (11 May 2022)
- RELEASE-NOTES: synced

  curl 7.83.1 release

- THANKS: added contributors from 7.83.1

- zuul: fix the ngtcp2-gnutls build

  Add packages and tweak the configure options.

  Use the GnuTLS 3.7.4 branch (not main).

  Closes #8829

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: add ca-fallback support for OpenSSL backend

  Closes #8828

- url: check SSH config match on connection reuse

  CVE-2022-27782

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

- tls: check more TLS details for connection reuse

  CVE-2022-27782

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

- cookies: make bad_domain() not consider a trailing dot fine

  The check for a dot in the domain must not consider a single trailing
  dot to be fine, as then TLD + trailing dot is fine and curl will accept
  setting cookies for it.

  CVE-2022-27779

  Reported-by: Axel Chong
  Bug: https://curl.se/docs/CVE-2022-27779.html
  Closes #8820

- test977: reproduce ability to set cookie on TLD

  When PSL is not enabled

- scripts/contributors.sh: correct the copyright range

- docs/RELEASE-PROCEDURE.md: refreshed and adjsuted the release dates

- test379: verify --remove-on-error with --no-clobber

- post_per_transfer: remove the updated file name

  When --remove-on-error is used with --no-clobber, it might have an
  updated file name to remove.

  Bug: https://curl.se/docs/CVE-2022-27778.html

  CVE-2022-27778

  Reported-by: Harry Sintonen

  Closes #8824

- hsts: ignore trailing dots when comparing hosts names

  CVE-2022-30115

  Reported-by: Axel Chong
  Bug: https://curl.se/docs/CVE-2022-30115.html
  Closes #8821

- test440/441: verify HSTS with trailing dots

- libtest/lib1560: verify the host name percent decode fix

- urlapi: reject percent-decoding host name into separator bytes

  CVE-2022-27780

  Reported-by: Axel Chong
  Bug: https://curl.se/docs/CVE-2022-27780.html
  Closes #8826

- nss: return error if seemingly stuck in a cert loop

  CVE-2022-27781

  Reported-by: Florian Kohnhäuser
  Bug: https://curl.se/docs/CVE-2022-27781.html
  Closes #8822

- test412/413: verify alt-svc with trailing dots

- altsvc: fix host name matching for trailing dots

  Closes #8819

- [Garrett Squire brought this change]

  hyper: fix test 357

  This change fixes the hyper API such that PUT requests that receive a
  417 response can retry without the Expect header.

  Closes #8811

- [Harry Sintonen brought this change]

  sectransp: bail out if SSLSetPeerDomainName fails

  Before the code would just warn about SSLSetPeerDomainName() errors.

  Closes #8798

- http_proxy/hyper: handle closed connections

  Enable test 1021 for hyper builds.

  Patched-by: Prithvi MK
  Fixes #8700
  Closes #8806

- KNOWN_BUGS: timeout when reusing a http3 connection

  Closes #8764

- KNOWN_BUGS: configure --with-ca-fallback is not supported by h3

  Closes #8696

- [Ryan Schmidt brought this change]

  Makefile: fix "make ca-firefox"

  Closes #8804

Daniel Gustafsson (5 May 2022)
- tests: fix markdown formatting in README

  The asterisk in the abbreviation *NIX (for UNIX/Linux) needs to be
  escaped to not mean start of italic formatting. This is consistent
  with docs/RELEASE-PROCEDURE.md.

  Closes: #8802
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (5 May 2022)
- TODO: expand on "Expose tried IP addresses that failed"

  Ref: #8794

Daniel Gustafsson (5 May 2022)
- [Fabian Keil brought this change]

  tests/server: declare variable 'reqlogfile' static

  Silences the warning:

       CC       socksd-socksd.o
     socksd.c:143:13: warning: no previous extern declaration for
      non-static variable 'reqlogfile' [-Wmissing-variable-declarations]
     const char *reqlogfile = DEFAULT_REQFILE;
                 ^
     socksd.c:143:7: note: declare 'static' if the variable is not
      intended to be used outside of this translation unit
     const char *reqlogfile = DEFAULT_REQFILE;
           ^
     1 warning generated.

  ... when compiling with clang 13.

  Closes: #8799
  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>

- HTTP-COOKIES: add missing CURLOPT_COOKIESESSION

  Commit 980a47b42 added support for ignoring session cookies, but it
  was never added to the documentation.

  Closes: #8795
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (5 May 2022)
- docs/THANKS: remove name duplicate

- [Philip H brought this change]

  .mailmap: update

  Closes #8800

Jay Satiro (5 May 2022)
- mbedtls: fix some error messages

  Prior to this change some of the error messages misidentified the
  function that failed.

Daniel Stenberg (5 May 2022)
- RELEASE-NOTES: synced

- [Sergey Markelov brought this change]

  x509asn1: make do_pubkey handle EC public keys

  Closes #8757

- [Harry Sintonen brought this change]

  mbedtls: bail out if rng init fails

  There was a failf() call but no actual error return.

  Closes #8796

- [Sergey Markelov brought this change]

  urlapi: address (harmless) UndefinedBehavior sanitizer warning

  `while(i--)` causes runtime error: unsigned integer overflow: 0 - 1
  cannot be represented in type 'size_t' (aka 'unsigned long')

  Closes #8797

- [Fabian Keil brought this change]

  test{898,974,976}: add 'HTTP proxy' keywords

  ... so the tests can be automatically skipped when
  testing external HTTP proxies like Privoxy.

  Closes #8791

- [Harry Sintonen brought this change]

  gskit_connect_step1: fixed bogus setsockopt calls

  setsockopt takes a reference to value, not value. With the current
  code this just leads to -1 return value with errno EFAULT.

  Closes #8793

- CURLOPT_SSH_AUTH_TYPES.3: fix the default

  The default is all possible methods.

  Closes #8792

- CURLOPT_DOH_URL.3: mention the known bug

  It is mostly duplicating info from KNOWN_BUGS but make it easier to find
  for users of this option.

  Closes #8790

- CURLOPT_HSTS*FUNCTION.3: document the involved structs as well

  Reviewed-By: Daniel Gustafsson
  Closes #8788

- docs/SECURITY-PROCESS.md: "Visible command line arguments"

- SECURITY-PROCESS: mention "URL inconsistencies"

  ... as common problems that are *not* vulns.

Daniel Gustafsson (2 May 2022)
- contributors: strip off final comma

  The final row of contributors should not end with a comma as it's the
  end of the list.

  Closes: #8785
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (2 May 2022)
- [Philip H brought this change]

  misc: use "autoreconf -fi" instead buildconf

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

Daniel Gustafsson (2 May 2022)
- [Philip H brought this change]

  cirrus: Use pip for Python packages on FreeBSD

  Using pip instead of easy_install is more in line with how other
  CI images are being maintained.

  Closes: #8783
  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>

- [Philip H brought this change]

  cirrus: Update to FreeBSD 12.3

  Closes: #8783
  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>

- tool_getparam: simplify conditional statement

  param_place cannot be NULL here since we immediately efter this block
  perform arithmetic on it (and use it in order to get here) so there is
  little reason to check.

  Closes: #8786
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- RELEASE-NOTES: synced

- gskit: remove unused function set_callback

  This function has been unused since the initial commit of the GSKit
  backend in 0eba02fd4.  The motivation for the code was getting the
  whole certificate chain: the only place where the latter is available
  is as a callback parameter.  Unfortunately it is not possible to pass
  a user pointer to this callback, which precludes the possibility to
  associate the cert chain with a data/conn structure.

  For further information, search for pgsk_cert_validation_callback on:
  https://www.ibm.com/docs/api/v1/content/ssw_ibm_i_71/apis/gsk_attribute_set_callback.htm

  As the upstream library never added a parameter like that to the API,
  we give up the wait and remove the dead code.

  Closes: #8782
  Reviewed-by: Patrick Monnerat <patrick@monnerat.net>

- curl: free resource in error path

  If the new filename cannot be generated due to memory pressure, free
  the allocated aname on the way out to avoid a small leak.

  Closes: #8770
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- curl: guard against size_t wraparound in no-clobber code

  When generating the new filename, make sure we aren't overflowing the
  size_t limit when calculating the new length. This is mostly academic
  but good code hygeine nonetheless.

  Closes: #8771
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Daniel Stenberg (30 Apr 2022)
- gha: build msh3

  Closes #8779

- scripts/cijobs.pl: try "current branch" first then "master"

- [Yusuke Nakamura brought this change]

  msh3: get msh3 version from MsH3Version

  Closes #8762

- [Yusuke Nakamura brought this change]

  msh3: psss remote_port to MsH3ConnectionOpen

  MsH3 supported additional "Port" parameter to connect not hosted on
  443 port QUIC website.

  * https://github.com/nibanks/msh3/releases/tag/v0.3.0
  * https://github.com/nibanks/msh3/pull/37

  Closes #8762

- [Christian Weisgerber brought this change]

  openssl: define HAVE_SSL_CTX_SET_EC_CURVES for libressl

  SSL_CTX_set1_curves_list() has been available since LibreSSL 2.5.3,
  released five years ago.

  Bug: https://curl.se/mail/lib-2022-04/0059.html
  Closes #8773

- http: move Curl_allow_auth_to_host()

  It was mistakenly put within the CURL_DISABLE_HTTP_AUTH #ifdef

  Reported-by: Michael Olbrich
  Fixes #8772
  Closes #8775

Daniel Gustafsson (29 Apr 2022)
- msh3: print boolean value as text representation

  Print the boolean value as its string representation instead of with
  %hhu which isn't a format we typically use.

  Closes: #8763
  Reviewed-by: Nick Banks <nibanks@microsoft.com>

Daniel Stenberg (29 Apr 2022)
- data/test376: set a proper name

- GHA/mbedtls: enabled nghttp2 in the build

  Closes #8767

- mbedtls: fix compile when h2-enabled

  Fixes #8766
  Reported-by: LigH-de on github
  Closes #8768

- RELEASE-NOTES: synced

  bumped curlver to 7.83.1-dev

- SECURITY-PROCESS: extended

  Also clarify BUG-BOUNTY.md with IBB details.

  Closes #8754

- [Adam Rosenfield brought this change]

  conn: fix typo 'connnection' -> 'connection' in two function names

  Closes #8759

Version 7.83.0 (27 Apr 2022)

Daniel Stenberg (27 Apr 2022)
- RELEASE-NOTES: synced

  The 7.83.0 release

- docs/THANKS: contributors from 7.83.0

- test 898/974/976: require proxy to run

  Fixes #8755
  Reported-by: Marc Hörsken
  Closes #8756

- gnutls: don't leak the SRP credentials in redirects

  Follow-up to 620ea21410030 and 139a54ed0a172a

  Reported-by: Harry Sintonen
  Closes #8752

- CURLOPT*TLSAUTH: they only work with OpenSSL or GnuTLS

  Closes #8753

- openssl: don't leak the SRP credentials in redirects either

  Follow-up to 620ea21410030

  Reported-by: Harry Sintonen
  Closes #8751

- [Liam Warfield brought this change]

  hyper: fix tests 580 and 581 for hyper

  Hyper now has the ability to preserve header order. This commit adds a
  few lines setting the connection options for this feature.

  Related to issue #8617
  Closes #8707

- conncache: remove name arg from Curl_conncache_find_bundle

  To simplify, and also since the returned name is not the full actual
  name used for the check. The port number and zone id is also involved,
  so just showing the name is misleading.

  Closes #8750

- tests: verify the fix for CVE-2022-27774

   - Test 973 redirects from HTTP to FTP, clear auth
   - Test 974 redirects from HTTP to HTTP different port, clear auth
   - Test 975 redirects from HTTP to FTP, permitted to keep auth
   - Test 976 redirects from HTTP to HTTP different port, permitted to keep
     auth

- transfer: redirects to other protocols or ports clear auth

  ... unless explicitly permitted.

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

- connect: store "conn_remote_port" in the info struct

  To make it available after the connection ended.

- cookie.d: clarify when cookies are always sent

- test898: verify the fix for CVE-2022-27776

  Do not pass on Authorization headers on redirects to another port

- http: avoid auth/cookie on redirects same host diff port

  CVE-2022-27776

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

- libssh2: make the md5 comparison fail if wrong length

  Making it just skip the check unless exactly 32 is too brittle. Even if
  the docs says it needs to be exactly 32, it is be safer to make the
  comparison fail here instead.

  Reported-by: Harry Sintonen
  Bug: https://hackerone.com/reports/1549461
  Closes #8745

- conncache: include the zone id in the "bundle" hashkey

  Make connections to two separate IPv6 zone ids create separate
  connections.

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

- [Patrick Monnerat brought this change]

  url: check sasl additional parameters for connection reuse.

  Also move static function safecmp() as non-static Curl_safecmp() since
  its purpose is needed at several places.

  Bug: https://curl.se/docs/CVE-2022-22576.html

  CVE-2022-22576

  Closes #8746

- libssh2: compare sha256 strings case sensitively

  Reported-by: Harry Sintonen
  Bug: https://hackerone.com/reports/1549435
  Closes #8744

- tool_getparam: error out on missing -K file

  Add test 411 to verify.

  Reported-by: Median Median Stride
  Bug: https://hackerone.com/reports/1542881
  Closes #8731

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: deal with sub-millisecond timeout

  Closes #8738

- misc: update copyright year ranges

- c_escape: escape '?' in generated --libcurl code

  In order to avoid the risk of it being used in an accidental trigraph in
  the generated code.

  Reported-by: Harry Sintonen
  Bug: https://hackerone.com/reports/1548535
  Closes #8742

- [Philip H brought this change]

  mlc: curl.zuul.vexxhost.dev is reachable again

  remove it from ignorelist for linkcheck

  Closes #8736

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: avoid busy loop in low CWND situation

  Closes #8739

- TODO: telnet - exit immediately upon connection if stdin is /dev/null

  Suggested-by: Robin A. Meade
  URL: https://curl.se/mail/archive-2022-04/0027.html

- [Kushal Das brought this change]

  docs: updates spellings with full words

  Closes #8730

- tests/FILEFORMAT.md: spellfix

Daniel Gustafsson (21 Apr 2022)
- misc: fix typos

  Fix a few random typos is comments and workflow names.

- macos: fix .plist installation into framework

  The copy command introduced in e498a9b1f had leftover '>' from the
  previous sed command it replaced, which broke its syntax.  Fix by
  removing.

  Reported-by: Emanuele Torre <torreemanuele6@gmail.com>

Daniel Stenberg (21 Apr 2022)
- [Christopher Degawa brought this change]

  Makefile: fix ca-bundle due to mk-ca-bundle.pl being moved

  The script was moved in 8e22fc68e7dda43e9f but the lines that called it
  was not changed to reflect it's new position

  Signed-off-by: Christopher Degawa <ccom@randomderp.com>

  Closes #8728

Daniel Gustafsson (20 Apr 2022)
- macos: set .plist version in autoconf

  Set the libcurl version in libcurl.plist like how libcurl.vers is
  created.

  Closes: #8692
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
  Reviewed-by: Nick Zitzmann <nickzman@gmail.com>

- cookies: Improve errorhandling for reading cookiefile

  The existing programming had some issues with errorhandling for reading
  the cookie file. If the file failed to open, we would silently ignore it
  and continue as if there was no file (or stdin) passed. In this case, we
  would also call fclose() on the NULL FILE pointer, which is undefined
  behavior. Fix by ensuring that the FILE pointer is set before calling
  fclose on it, and issue a warning in case the file cannot be opened.
  Erroring out on nonexisting file would break backwards compatibility of
  very old behavior so we can't really go there.

  Closes: #8699
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
  Reviewed-by: Jay Satiro <raysatiro@yahoo.com>

Daniel Stenberg (20 Apr 2022)
- libcurl-tutorial.3: spellfix and minor polish

- CURLINFO_PRIMARY_PORT.3: spellfix

  Reported-by: Patrick Monnerat

- [Jay Dommaschk brought this change]

  libssh: fix double close

  libssh closes the socket in ssh_diconnect() so make sure that libcurl
  does not also close it.

  Fixes #8708
  Closes #8718

Jay Satiro (20 Apr 2022)
- [Gisle Vanem brought this change]

  unit1620: call global_init before calling Curl_open

  Curl_open calls the resolver init and on Windows if the resolver backend
  is c-ares then the Windows sockets library (winsock) must already have
  been initialized (via global init).

  Ref: https://github.com/curl/curl/pull/8540#issuecomment-1059771800

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

Daniel Stenberg (19 Apr 2022)
- CURLINFO_PRIMARY_PORT.3: clarify which port this is

  As it was not entirely clear previously.

  Closes #8725

- CURLOPT_UNRESTRICTED_AUTH.3: extended explanation

  Include details about Authentication headers.

  Reported-by: Brad Spencer
  Fixes #8724
  Closes #8726

- .github/workflows/macos.yml: add a libssh job with c-ares

  ... to enable the memdebug system

  Closes #8720

- RELEASE-NOTES: synced

Jay Satiro (17 Apr 2022)
- [Gisle Vanem brought this change]

  docs/HTTP3.md: fix typo

  also fix msh3 section formatting

  Ref: https://github.com/curl/curl/commit/37492ebb#r70980087

Marc Hoersken (17 Apr 2022)
- timediff.[ch]: add curlx helper functions for timeval conversions

  Also move timediff_t definitions from timeval.h to timediff.h and
  then make timeval.h include the new standalone-capable timediff.h.

  Reviewed-by: Jay Satiro
  Reviewed-by: Daniel Stenberg

  Supersedes #5888
  Closes #8595

Daniel Stenberg (17 Apr 2022)
- [Balakrishnan Balasubramanian brought this change]

  tests: refactor server/socksd.c to support --unix-socket

  Closes #8687

- [Emanuele Torre brought this change]

  tool_paramhlp: use feof(3) to identify EOF correctly when using fread(3)

  This loop was using the number of bytes read from the file as condition
  to keep reading.

  From Linux's fread(3) man page:
  > On success, fread() and fwrite() return the number of items read or
  > written. This number equals the number of bytes transferred only when
  > size is 1. If an error occurs, or the end of the file is reached, the
  > return value is a short item count (or zero).
  >
  > The file position indicator for the stream is advanced by the number
  > of bytes successfully read or written.
  >
  > fread() does not distinguish between end-of-file and error, and
  > callers must use feof(3) and ferror(3) to determine which occurred.

  This means that nread!=0 doesn't make much sense as an end condition for
  the loop: nread==0 doesn't necessarily mean that EOF has been reached or
  an error has occured (but that is usually the case) and nread!=0 doesn't
  necessarily mean that EOF has not been reached or that no read errors
  have occured. feof(3) and ferror(3) should be uses when using fread(3).

  Currently curl has to performs an extra fread(3) call to get a return
  value equal to 0 to stop looping.

  This usually "works" (even though nread==0 shouldn't be interpreted as
  EOF) if stdin is a pipe because EOF usually marks the "real" end of the
  stream, so the extra fread(3) call will return immediately and the extra
  read syscall won't be noticeable:

      bash-5.1$ strace -e read curl -s -F file=@- 0x0.st <<< a 2>&1 |
      > tail -n 5
      read(0, "a\n", 4096)                    = 2
      read(0, "", 4096)                       = 0
      read(0, "", 4096)                       = 0
      http://0x0.st/oRs.txt
      +++ exited with 0 +++
      bash-5.1$

  But this doesn't work if curl is reading from stdin, stdin is a
  terminal, and the EOF is being emulated using a shell with ^D. Two
  consecutive ^D will be required in this case to actually make curl stop
  reading:

      bash-5.1$ curl -F file=@- 0x0.st
      a
      ^D^D
      http://0x0.st/oRs.txt
      bash-5.1$

  A possible workaround to this issue is to use a program that handles EOF
  correctly to indirectly send data to curl's stdin:

      bash-5.1$ cat - | curl -F file=@- 0x0.st
      a
      ^D
      http://0x0.st/oRs.txt
      bash-5.1$

  This patch makes curl handle EOF properly when using fread(3) in
  file2memory() so that the workaround is not necessary.

  Since curl was previously ignoring read errors caused by this fread(3),
  ferror(3) is also used in the condition of the loop: read errors and EOF
  will have the same meaning; this is done to somewhat preserve the old
  behaviour instead of making the command fail when a read error occurs.

  Closes #8701

- gen.pl: change wording for mutexed options

  Instead of saying "This option overrides NNN", now say "This option is
  mutually exclusive to NNN" in the generated man page ouput, as the
  option does not in all cases actually override the others but they are
  always mutually exclusive.

  Ref: #8704
  Closes #8716

- curl: error out if -T and -d are used for the same URL

  As one implies PUT and the other POST, both cannot be used
  simultaneously.

  Add test 378 to verify.

  Reported-by: Boris Verkhovskiy
  Fixes #8704
  Closes #8715

- lib: remove exclamation marks

  ... from infof() and failf() calls. Make them less attention seeking.

  Closes #8713

- fail.d: tweak the description

  Reviewed-by: Daniel Gustafsson
  Suggested-by: Robert Charles Muir
  Ref: https://twitter.com/rcmuir/status/1514915401574010887

  Closes #8714

Daniel Gustafsson (15 Apr 2022)
- docs: Fix missing semicolon in example code

  Multiple share examples were missing a semicolon on the line defining
  the CURLSHcode variable.

  Closes: #8697
  Reported-by: Michael Kaufmann <mail@michael-kaufmann.ch>
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- infof: consistent capitalization of warning messages

  Ensure that all infof calls with a warning message are capitalized
  in the same way.  At some point we should probably set up a style-
  guide for infof but until then let's aim for a little consistenncy
  where we can.

  Closes: #8711
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

- RELEASE-NOTES: synced

- [Matteo Baccan brought this change]

  perl: removed a double semicolon at end of line

  Remove double semicolons at end of line in Perl code.

  Closes: #8709
  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>

- curl_easy_header: fix typos in documentation

  Closes: #8694
  Reviewed-by: Daniel Stenberg <daniel@haxx.se>

Marcel Raad (11 Apr 2022)
- appveyor: add Cygwin build

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

- appveyor: only add MSYS2 to PATH where required

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

Daniel Stenberg (10 Apr 2022)
- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: fix memory leak

  Closes #8691

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: remove remote_addr which is not used in a meaningful way

  Closes #8689

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: enlarge H3_SEND_SIZE

  Make h3_SEND_SIZE larger because current value (20KiB) is too small
  for the high latency environment.

  Closes #8690

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: fix HTTP/3 upload stall and avoid busy loop

  This commit fixes HTTP/3 upload stall if upload data is larger than
  H3_SEND_SIZE.  Only check writability of socket if a stream is
  writable to avoid busy loop when QUIC flow control window is filled
  up, or upload buffer is full.

  Closes #8688

- [Nick Banks brought this change]

  msh3: add support for QUIC and HTTP/3 using msh3

  Considered experimental, as the other HTTP/3 backends.

  Closes #8517

- TODO: "SFTP with SCP://"

- GHA: move bearssl jobs over from zuul

  Closes #8684

- data/DISABLED: disable test 313 on bearssl builds

  Closes #8684

- runtests: add 'bearssl' as testable feature

  Closes #8684

- GHA: add openssl3 jobs moved over from zuul

  Closes #8683

- schannel: remove dead code that will never run

  As the condition can't ever evaluate true

  Reported-by: Andrey Alifanov
  Ref: #8675
  Closes #8677

- connecache: remove duplicate connc->closure_handle check

  The superfluous extra check could cause analyzer false positives
  and doesn't serve any purpose.

  Closes #8676

- [Michał Antoniak brought this change]

  mbedtls: remove server_fd from backend

  Closes #8682

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: use token when detecting :status header field

  Closes #8679

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: make curl 1ms faster

  Pass 0 for an already expired timer.

  Closes #8678

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: fix QUIC_IDLE_TIMEOUT

  QUIC_IDLE_TIMEOUT should be of type ngtcp2_duration which is
  nanoseconds resolution.

  Closes #8678

- English: use American spelling consistently

  Authorization, Initialization, Organization etc.

  Closes #8673

Daniel Gustafsson (5 Apr 2022)
- [Sascha Zengler brought this change]

  BUGS: Fix incorrect punctuation

  Closes #8672
  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>

Daniel Stenberg (4 Apr 2022)
- tool_listhelp.c: uppercase URL

- RELEASE-NOTES: synced

- http: streamclose "already downloaded"

  Instead of connclose()ing, since when HTTP/2 is used it doesn't need to
  close the connection as stopping the current transfer is enough.

  Reported-by: Evangelos Foutras
  Closes #8665

Jay Satiro (1 Apr 2022)
- ftp: fix error message for partial file upload

  - Show the count of bytes written on partial file upload.

  Prior to this change the error message mistakenly showed the count of
  bytes read, not written.

  Bug: https://github.com/curl/curl/discussions/8637
  Reported-by: Taras Kushnir

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

Daniel Stenberg (1 Apr 2022)
- http: correct the header error message to say colon

  Not semicolon

  Reported-by: Gisle Vanem
  Ref: #8666
  Closes #8667

- lib: #ifdef on USE_HTTP2 better

  ... as nghttp2 might not be the library that provides HTTP/2 support.

  Closes #8661

- [Michał Antoniak brought this change]

  mbedtls: remove 'protocols' array from backend when ALPN is not used

  Closes #8663

- http2: RST the stream if we stop it on our own will

  For the "simulated 304" case the done-call isn't considered "premature"
  but since the server didn't close the stream it needs to be reset to
  stop delivering data.

  Closes #8664

- http: close the stream (not connection) on time condition abort

  Closes #8664

- http2: handle DONE called for the paused stream

  As it could otherwise stall all streams on the connection

  Reported-by: Evangelos Foutras
  Fixes #8626
  Closes #8664

- tls: make mbedtls and NSS check for h2, not nghttp2

  This makes them able to also negotiate HTTP/2 even when built to use
  hyper for h2.

  Closes #8656

- tests/libtest/lib670.c: fixup the copyright year range

  follow-up to b54e18640ea4b7

- [Leandro Coutinho brought this change]

  lib670: avoid double check result

  Closes #8660

- vtls: use a generic "ALPN, server accepted" message

  Closes #8657

- vtls: use a backend standard message for "ALPN: offers %s"

  I call it VTLS_INFOF_ALPN_OFFER_1STR, the '1str' meaning that the
  infof() call also needs a string argument: the ALPN ID.

  Closes #8657

- [Christian Schmitz brought this change]

  strcase.h: add comment about the return code

  Tool often we run into expecting this to work like strcmp, but it
  returns 1 instead of 0 for match.

  Closes #8658

- vtls: provide a unified APLN-disagree string for all backends

  Also rephrase to make it sound less dangerous:

   "ALPN: server did not agree on a protocol. Uses default."

  Reported-by: Nick Coghlan
  Fixes #8643
  Closes #8651

- projects/README: converted to markdown

  Closes #8652

- misc: spelling fixes

  Mostly in comments but also in the -w documentation for headers_json.

  Closes #8647

- KNOW_BUGS: HTTP3/Transfer closed with n bytes remaining to read

  "HTTP/3 does not support client certs" considered fixed, at least with
  the ngtcp2 backend.

  Closes #8523

- CURLOPT_PREQUOTE.3: only works for FTP file transfers, not dirs

  Also add to quote.d. Add to TODO as something to add in a future.

  Reported-by: anon00000000 on github
  Closes #8602
  Closes #8648

- RELEASE-NOTES: synced

- pop3/smtp: return *WEIRD_SERVER_REPLY when not understood

  This leaves the CURLE_RECV_ERROR error code for explicit failure to
  receive network data and allows users to better separate the problems.

  Ref #8356
  Reported-by: Rianov Viacheslav
  Closes #8506

- docs: lots of minor language polish

  Mostly based on recent language decisions from "everything curl":

  - remove contractions (isn't => is not)
  - *an* HTTP (consistency)
  - runtime (no hyphen)
  - backend (no hyphen)
  - URL is uppercase

  Closes #8646

Jay Satiro (29 Mar 2022)
- projects: Update VC version names for VS2017, VS2022

  - Rename VC15 -> VC14.10, VC17 -> VC14.30.

  The projects directory that holds the pre-generated Visual Studio
  project files uses VC<ver> to indicate the MSVC version. At some point
  support for Visual Studio 2017 (Visual Studio version 15 which uses MSVC
  14.10) was added as VC15. Visual Studio 2022 (Visual Studio version 17
  which uses MSVC 14.30) project files were recently added and followed
  that same format using VC17.

  There is no such MSVC version (yet) as VC15 or VC17.

  For VS 2017 for example, the name we use is correct as either VS17,
  VS2017, VC14.10. I opted for the latter since we use VC for earlier
  versions (eg VC10, VC12, etc).

  Ref: https://github.com/curl/curl/pull/8438#issuecomment-1037070192

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

Daniel Stenberg (29 Mar 2022)
- mqtt: better handling of TCP disconnect mid-message

  Reported-by: Jenny Heino
  Bug: https://hackerone.com/reports/1521610
  Closes #8644

- CURLOPT_DISALLOW_USERNAME_IN_URL.3: use uppercase URL

- [Ian Blanes brought this change]

  docs/DYNBUF: clarify documentation for Curl_dyn_ptr and Curl_dyn_uptr

  Closes #8606

- [Ian Blanes brought this change]

  curl: fix segmentation fault for empty output file names.

  Function glob_match_url set *result to NULL when called with filename =
  "", producing an indirect NULL pointer dereference.

  Closes #8606

- TODO: Read keys from ~/.ssh/id_ecdsa, id_ed25519

  It would be nice to expand the list of key locations curl uses for the
  newer key types supported by libssh2.

  Closes #8586

- ngtcp2: update to work after recent ngtcp2 updates

  Assisted-by: Tatsuhiro Tsujikawa
  Reported-by: jurisuk on github
  Fixes #8638
  Closes #8639

- [Farzin brought this change]

  CURLOPT_PROGRESSFUNCTION.3: fix typo in example

  Closes #8636

- curl/header_json: output the header names in lowercase

  To better allow json[“header”].

  Reported-by: Peter Korsgaard
  Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
  Closes #8633

- RELEASE-NOTES: synced

- headers.h: make Curl_headers_push() be CURLE_OK when not built

  ... to avoid errors when the function isn't there.

  Reported-by: Marcel Raad
  Fixes #8627
  Closes #8628

- scripts: move three scripts from lib/ to scripts/

  Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
  particularly belong in lib/

  Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
  those files in the root Makefile.am

  Closes #8625

Marc Hoersken (23 Mar 2022)
- lib/warnless.[ch]: only check for WIN32 and ignore _WIN32

  curl_setup.h automatically defines WIN32 if just _WIN32 is defined.

  Therefore make sure curl_setup.h is included through warnless.h.

  Reviewed-by: Daniel Stenberg
  Reviewed-by: Jay Satiro

  Closes #8594

- tests/server/util.h: align WIN32 condition with util.c

  There is no need to test for both _WIN32 and WIN32 as curl_setup.h
  automatically defines the later if the first one is defined.

  Also tests/server/util.c is only checking for WIN32 arouund the
  implementation of win32_perror, so just defining _WIN32
  would not be sufficient for a successful compilation.

  Reviewed-by: Daniel Stenberg
  Reviewed-by: Jay Satiro

  Closes #8594

Daniel Stenberg (22 Mar 2022)
- [Philip H brought this change]

  firefox-db2pem.sh: make the shell script safer

  Reported by lift

  Closes #8616

Jay Satiro (22 Mar 2022)
- gtls: fix build for disabled TLS-SRP

  Prior to this change if, at build time, the GnuTLS backend was found to
  have TLS-SRP support (HAVE_GNUTLS_SRP) but TLS-SRP was disabled in curl
  via --disable-tls-srp (!USE_TLS_SRP) then a build error would occur.

  Bug: https://curl.se/mail/lib-2022-03/0046.html
  Reported-by: Robert Brose

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

- winbuild: Add a Visual Studio example to the README

  - Add an example that explains in detail how the user can add libcurl to
    their Visual Studio project.

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

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

- docs/opts: Mention Schannel client cert type is P12

  Schannel backend code behaves same as Secure Transport, it expects a P12
  certificate file or the name of a certificate already in the user's OS
  key store. Also, both backends ignore CURLOPT_SSLKEY (tool: --key)
  because they expect the private key to already be available from the
  keystore or P12 certificate.

  Ref: https://github.com/curl/curl/discussions/8581#discussioncomment-2337260

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

Daniel Stenberg (22 Mar 2022)
- lib1945: fix compiler warning 4706 on MSVC

  Follow-up from d1e4a677340c

  Closes #8623

- [Philip H brought this change]

  ci/event-based.yml: improve impacket install

  skip python3-pip
  install impacket with library module

  Closes #8621

- test1459: disable for oldlibssh

  This test with libssh 0.9.3 works fine on github but fails on circleci.
  Might as well disable this test for oldlibssh installations.

  Closes #8622

- test1135: sync with recent API updates

  This test verifies that the order of functions in public headers remain
  the same but hasn't been updated to care for recently added header
  files. The order is important for some few platforms - or VERSIONINFO
  needs to updated.

  This fix also updates VERSIONINFO to be sure.

  Closes #8620

- curl_easy_nextheader.3: fix two typos

  Reported-by: Timothe Litt
  Bug: https://curl.se/mail/lib-2022-03/0060.html

- options: remove mistaken space before paren in prototype

- cirrus: add --enable-headers-api for some windows builds

- GHA: --enable-headers-api in all workflows

- lib: make the headers API depend on --enable-headers-api

- configure: add --enable-headers-api to enable the headers API

  Defaults to disabled while labeled EXPERIMENTAL.

  Make all the headers API tests require 'headers-api' to run.

- test1671: verify -w '%{header_json}

- test1670: verify -w %header{}

- curl: add %{header_json} support in -w handling

  Outputs all response headers as a JSON object.

- curl: add %header{name} support in -w handling

  Outputs the response header 'name'

- header api: add curl_easy_header and curl_easy_nextheader

  Add test 1940 to 1946 to verify.

  Closes #8593

- test1459: remove the different exit code for oldlibssh

  When using libssh/0.9.3/openssl/zlib, we seem to be getting the "right"
  error code.

  Closes #8490

- libssh: unstick SFTP transfers when done event-based

  Test 604 and 606 (at least).

  Closes #8490

- gha: move the event-based test over from Zuul

  Switched libssh2 to libssh

  Closes #8490

- RELEASE-NOTES: synced

- http: return error on colon-less HTTP headers

  It's a protocol violation and accepting them leads to no good.

  Add test case 398 to verify

  Closes #8610

- test718: edited slightly to return better HTTP

  Since hyper is picky and won't play ball otherwise.

  Bug: https://github.com/hyperium/hyper/issues/2783
  Reported-by: Daniel Valenzuela
  Closes #8614

- hyper: no h2c support

  Make tests require h2c feature present to run, and only set h2c if
  nghttp2 is used in the build. Hyper does not support it.

  Remove those tests from DISABLED

  Fixes #8605
  Closes #8613

- configure: bump the copyright year range int the generated output

- [Andreas Falkenhahn brought this change]

  BINDINGS.md: add Hollywood binding

  Closes #8609

- HISTORY: add some 2022 data

- scripts/copyright.pl: ignore the new mlc_config.json file

- [Philip H brought this change]

  mlc_config.json: add file to ignore known troublesome URLs

  This is the config file for the CI markdown link checker and lets us
  filter URLs that are known to cause problems. Like
  https://curl.zuul.vexxhost.dev/ for now.

  Closes #8597

- [Philip H brought this change]

  winbuild/README.md: fixup dead link

  Closes #8597

Jay Satiro (18 Mar 2022)
- rtsp: don't let CSeq error override earlier errors

  - When done, if an error has already occurred then don't check the
    sequence numbers for mismatch.

  A sequence number may not have been received if an error occurred.

  Prior to this change a sequence mismatch error would override earlier
  errors. For example, a server that returns nothing would cause error
  CURLE_GOT_NOTHING in Curl_http_done which was then overridden by
  CURLE_RTSP_CSEQ_ERROR in rtsp_done.

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

- lib: fix some misuse of curlx_convert_wchar_to_UTF8

  curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
  prior to this change some uses mistakenly called free.

  I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
  curlx_convert_UTF8_to_wchar.

  Ref: https://github.com/curl/curl/commit/1d5d0ae

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

- mk-ca-bundle.pl: Use stricter logic to process the certificates

  .. and bump version to 1.29.

  This change makes the script properly ignore unknown blocks and
  otherwise fail when Mozilla changes the certdata format in ways we
  don't expect. Though this is less flexible behavior it makes it far less
  likely that an invalid certificate can slip through.

  Prior to this change the state machine did not always properly reset,
  and it was possible that a certificate marked as invalid could then
  later be marked as valid when there was conflicting trust info or
  an unknown block was erroneously processed as part of the certificate.

  Ref: https://github.com/curl/curl/pull/7801#pullrequestreview-768384569

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

Marcel Raad (17 Mar 2022)
- test375: fix line endings on Windows

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

Daniel Stenberg (17 Mar 2022)
- http: reject header contents with nul bytes

  They are not allowed by the protocol and allowing them risk that curl
  misbehaves somewhere where C functions are used but won't work on the
  full contents. Further, they are not supported by hyper and they cause
  problems for the new coming headers API work.

  Updated test 262 to verify and enabled it for hyper as well

  Closes #8601

- [Philip H brought this change]

  CI: Do not use buildconf. Instead, just use: autoreconf -fi

  Closes #8596

- RELEASE-NOTES: synced

Jay Satiro (14 Mar 2022)
- libssh: Improve fix for missing SSH_S_ stat macros

  - If building libcurl against an old libssh version missing SSH_S_IFMT
    and SSH_S_IFLNK then use the values from a supported version.

  Prior to this change if libssh did not define SSH_S_IFMT and SSH_S_IFLNK
  then S_IFMT and S_IFLNK, respectively, were used instead. The problem
  with that is the user's S_ stat macros don't have the same values across
  platforms. For example Windows has values different from Linux.

  Follow-up to 7b0fd39.

  Ref: https://github.com/curl/curl/pull/8511#discussion_r815292391
  Ref: https://github.com/curl/curl/pull/8574

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

Marc Hoersken (13 Mar 2022)
- tool and tests: force flush of all buffers at end of program

  On Windows data can be lost in buffers in case of abnormal program
  termination, especially in process chains as seen due to flaky tests.
  Therefore flushing all buffers manually should avoid this data loss.

  In the curl tool we play the safe game by only flushing write buffers,
  but in the testsuite where we manage all buffers, we flush everything.

  This should drastically reduce Windows CI and testsuite flakiness.

  Reviewed-by: Daniel Stenberg

  Supersedes #7833 and #6064
  Closes #8516

Daniel Stenberg (12 Mar 2022)
- [Jan Venekamp brought this change]

  BearSSL: add CURLOPT_SSL_CTX_FUNCTION support

  Closes #8478

- [Jan Venekamp brought this change]

  BearSSL: add CURLOPT_SSL_CIPHER_LIST support

  Closes #8477

Dan Fandrich (11 Mar 2022)
- tool_cb_hdr: Turn the Location: into a terminal hyperlink

  This turns even relative URLs into clickable hyperlinks in a supported
  terminal when --styled-output is enabled. Many terminals already turn
  URLs into clickable links but there is not enough information in a
  relative URL to do this automatically otherwise.

- keepalive-time.d: It takes many probes to detect brokenness

Daniel Stenberg (11 Mar 2022)
- [HexTheDragon brought this change]

  curl: add --no-clobber

  Does not overwrite output files if they already exist

  Closes #7708
  Co-authored-by: Daniel Stenberg

- RELEASE-NOTES: synced

  also bump next pending version to become 7.83.0

- [Jean-Philippe Menil brought this change]

  openssl: check SSL_get_peer_cert_chain return value

  Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
  Closes #8579

- [Jay Satiro brought this change]

  mk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl

  mk-ca-bundle.vbs is a Windows-specific script for Mozilla certificate
  extraction, similar to mk-ca-bundle.pl which runs on any platform. The
  vbs version has not been maintained while the perl version has been
  maintained with improvements and security fixes. I don't think it's
  worth the work to maintain both versions. Windows users should be able
  to use mk-ca-bundle.pl without any problems, as long as they have perl.

  Closes #8412

- CURLSHOPT_UNLOCKFUNC.3: fix the callback prototype

  Copy and paste error

  Reported-by: Francisco Olarte
  Fixes #8573
  Closes #8577

- remove-on-error.d: typo

  Reported-by: Colin Leroy
  Bug: https://github.com/curl/curl/pull/8503#pullrequestreview-906520081

- curl: add --remove-on-error

  If a transfer returns an error, using this option makes curl remove the
  leftover downloded (partial) local file before exiting.

  Added test 376 to verify

  Closes #8503

- libssh: fix build with old libssh versions

  ... that don't have the SSH_S_* defines. Spotted on a machine using
  libssh 0.7.3

  Closes #8574

- hyper: fix status_line() return code

  Detected while working on #7708 that happened to trigger an error here
  with a new test case.

  Closes #8572

- [Alejandro R. Sedeño brought this change]

  configure.ac: move -pthread CFLAGS setting back where it used to be

  The fix for #8276 proposed in #8374 set `CFLAGS="$CFLAGS -pthead"`
  earlier than it used to be set, applying it in cases where it should not
  have been applied.

  This moves the AIX XLC check to a new `case $host in` block inside of
  the `if test "$USE_THREADS_POSIX" != "1"` block, where `CFLAGS="$CFLAGS
  -pthead"` used to happen.

  Fixes #8541
  Closes #8542

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: add client certificate authentication for OpenSSL

  Closes #8522

- tool_operate: fix a scan-build warning

  ... and avoid the temp storing of the return code in a diff variable.

  Closes #8565

- test375: verify that --proxy errors out if proxy is disabled in the build

  Closes #8565

- curl: error out when options need features not present in libcurl

  Trying to use a proxy when libcurl was built with proxy support disabled
  should make curl error out properly.

  Remove knowledge of disabled features from the tool code and instead
  make it properly respond to what libcurl returns. Update all tests to
  properly require the necessary features to be present/absent so that the
  test suite can still be run even with libcurl builds with disabled
  features.

  Ref: https://curl.se/mail/archive-2022-03/0013.html
  Closes #8565

- ngtcp2: disconnect the QUIC connection proper

  Reported-by: mehatzri on github
  Reviewed-by: Tatsuhiro Tsujikawa
  Fixes #8534
  closes #8569

Dan Fandrich (9 Mar 2022)
- test386: Fix an incorrect test markup tag

Daniel Stenberg (9 Mar 2022)
- [Don J Olmstead brought this change]

  nonblock: restore setsockopt method to curlx_nonblock

  The implementation using setsockopt was removed when BeOS support was
  purged. However this functionality wasn't BeOS specific, it is still
  used by for example Orbis OS (Playstation 4/5 OS).

  Closes #8562

- openssl: fix CN check error code

  Due to a missing 'else' this returns error too easily.

  Regressed in: d15692ebb

  Reported-by: Kristoffer Gleditsch
  Fixes #8559
  Closes #8560

- [Frank Meier brought this change]

  connect: make Curl_getconnectinfo work with conn cache from share handle

  Closes #8524

- [lwthiker brought this change]

  openssl: enable CURLOPT_SSL_EC_CURVES with BoringSSL

  The CURLOPT_SSL_EC_CURVES option (used by the '--curves' flag) in
  libcurl was ignored when compiling with BoringSSL because
  HAVE_SSL_CTX_SET_EC_CURVES was explicitly disabled if BoringSSL was
  detected.  However, this feature is supported in BoringSSL since
  5fd1807d. This commit enables it, and also reduces the required minimal
  OpenSSL version to 1.0.2 as per OpenSSL's official documentation.

  Fixes #8553
  Closes #8556

- [Samuel Henrique brought this change]

  json.d: fix typo (overriden -> overridden)

  Closes #8557

- wolfssl: fix compiler error without IPv6

  Reported-by: Joseph Chen
  Fixes #8550
  Closes #8552

- RELEASE-NOTES: synced

  and bump pending version to 7.82.1

- [Paul Howarth brought this change]

  runtests: make 'oldlibssh' be before 0.9.4

  The 'oldlibssh' feature indicates that the error code returned by libssh
  for a broken known_hosts file should be 67 rather than 60 (test1459).
  This feature was added as part of #8444 with 'oldlibssh' mapping to
  libssh versions prior to 0.9.6, and then refined as part of #8511 to map
  to versions prior to 0.9.5.

  In Red Hat Enterprise Linux 8.5 there is a patched version of libssh
  version 0.9.4 (https://git.centos.org/rpms/libssh/blob/c8/f/SOURCES) in
  which test1459 fails because it returns the "new" value rather than the
  "old" one. It's plausible that one of the patches is responsible for
  this rather than the underlying code but I don't think so.

  This change therefore drops the 'oldlibssh' version check to map to
  libssh versions older than 0.9.4, which fixes builds on RHEL-8.

  Closes #8548

- ipv4/6.d: clarify that they are about using IP addresses

  ... they may still *resolve* other families, but not use those
  addresses.

  Ref: #8530
  Closes #8543

- [r-a-sattarov brought this change]

  curl/system.h: update ifdef condition for MCST-LCC compiler

  in mcst-lcc compiler => 1.25 added a new macro definition to determine
  compiler

  Closes #8546

Marc Hoersken (6 Mar 2022)
- CI: install Python package impacket to run SMB test 1451

  Install Python package impacket in relevant CI workflows.

  Follow up to #7935
  Supersedes #7940
  Closes #8544

Daniel Stenberg (5 Mar 2022)
- [Michał Antoniak brought this change]

  connect: use TCP_KEEPALIVE only if TCP_KEEPIDLE is not defined

  Closes #8539

- docs/HYPER.md: updated to reflect current hyper build needs

- GHA: build hyper with nightly rustc

  Closes #8545

Version 7.82.0 (5 Mar 2022)

Daniel Stenberg (5 Mar 2022)
- RELEASE-NOTES: synced

  The 7.82.0 release

- THANKS: updates from the 7.82.0 release notes

- misc: update copyright year ranges

Jay Satiro (5 Mar 2022)
- unit1610: init SSL library before calling SHA256 functions

  The SSL library must be initialized (via global initialization) because
  libcurl's SHA256 functions may call SHA256 functions in the SSL library.

  Reported-by: Gisle Vanem

  Fixes https://github.com/curl/curl/issues/8538
  Closes https://github.com/curl/curl/pull/8540

- examples/curlx: support building with OpenSSL 1.1.0+

  - Access members of X509_STORE_CTX in OpenSSL 1.1.0+ by using API
    functions.

  The X509_STORE_CTX struct has been opaque since OpenSSL 1.1.0.

  Ref: https://curl.se/mail/lib-2022-03/0004.html

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

- h2h3: fix typo

  Bug: https://github.com/curl/curl/issues/8381#issuecomment-1055440241
  Reported-by: Michael Kaufmann

- [Farzin brought this change]

  CURLOPT_XFERINFOFUNCTION.3: fix example struct assignment

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

Daniel Stenberg (26 Feb 2022)
- azure-pipelines: add a build on Windows with libssh

  Closes #8511

- runtests: make 'oldlibssh' be before 0.9.5

  Closes #8511

- libssh: fix include files and defines use for Windows builds

  Reported-by: 梦终无痕
  Bug: https://curl.se/mail/lib-2022-02/0131.html
  Closes #8511

- RELEASE-NOTES: synced

- [illusory-dream brought this change]

  winbuild: add parameter WITH_SSH

  For building with libssh
  Closes #8514

- configure: change output for cross-compiled alt-svc support

  It said 'no', while it actually is 'yes'

  Closes #8512

- gha: add a macOS CI job with libssh

  Closes #8513

- TODO: remove "Bring back libssh tests on Travis"

  The job was added to Circle CI in d8ddd0e7536

- TODO: remove "better persistency for HTTP/1.0"

  Let's not bother.

- TODO: remove "Option to ignore private IP"

  ... as curl ignores the IP entirely by default these days.

- TODO: remove "hardcode the "localhost" addresses"

  This is implmented since 1a0ebf6632f88

- TODO: 1.24 was a dupe of 1.1

- TODO: remove "Typesafe curl_easy_setopt()"

  I don't consider this a serious TODO item

- KNOWN_BUGS: remove "Uploading HTTP/3 files gets interrupted"

  This works now

- KNOWN_BUGS: remove "HTTP/3 multipart POST with quiche fails"

  It works now

- quiche: remove two leftover debug infof() outputs

- [Tatsuhiro Tsujikawa brought this change]

  ngtcp2: Reset dynbuf when it is fully drained

  Reported-by: vl409 on github
  Fixes #7351
  Closes #8504

- [Stewart Gebbie brought this change]

  hostip: avoid unused parameter error in Curl_resolv_check

  When built without DNS-over-HTTP and without asynchronous resolvers,
  neither the dns nor the data parameters are used.

  That is Curl_resolv_check appears to call
  Curl_resolver_is_resolved(data, dns). But,
  with CURL_DISABLE_DOH without CURLRES_ASYNCH, the call is actually
  elided via a macro definition.

  This fix resolves the resultant: "unused parameter 'data'" error.

  Closes #8505

- http2: move two infof calls to debug-h2-only

  and remove a superflous one

  Ref: https://github.com/curl/curl/discussions/8498
  Closes #8502

- [Jean-Philippe Menil brought this change]

  quiche: fix upload for bigger content-length

  Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
  Closes #8421

Jay Satiro (23 Feb 2022)
- [Farzin brought this change]

  CURLOPT_PROGRESSFUNCTION.3: fix example struct assignment

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

Daniel Stenberg (22 Feb 2022)
- [Rob Boeckermann brought this change]

  OS400/README: clarify compilation steps

  Closes #8494

- [Rob Boeckermann brought this change]

  OS400: fix typos in rpg include file

  This resolves issues compiling rpg code that includes the curl header
  file.

  Closes #8494

- [Michał Antoniak brought this change]

  vtls: fix socket check conditions

  fix condition to check the second socket during associate and
  disassociate connection

  Closes #8493

- libssh2: don't typecast socket to int for libssh2_session_handshake

  Since libssh2_socket_t uses SOCKET on windows which can be larger than
  int.

  Closes #8492

- RELEASE-NOTES: fix typo and make one desc shorter

- RELEASE-NOTES: synced

- CURLOPT_XFERINFOFUNCTION.3: fix typo in example

  Reported-by: coralw on github
  Fixes #8487
  Closes #8488

- README: disable linkchecks for the sponsor links

  Closes #8489

Jay Satiro (21 Feb 2022)
- openssl: check if sessionid flag is enabled before retrieving session

  Ideally, Curl_ssl_getsessionid should not be called unless sessionid
  caching is enabled. There is a debug assertion in the function to help
  ensure that. Therefore, the pattern in all vtls is basically:

    if(primary.sessionid) {lock(); Curl_ssl_getsessionid(...); unlock();}

  There was one instance in openssl.c where sessionid was not checked
  beforehand and this change fixes that.

  Prior to this change an assertion would occur in openssl debug builds
  during connection stage if session caching was disabled.

  Reported-by: Jim Beveridge

  Fixes https://github.com/curl/curl/issues/8472
  Closes https://github.com/curl/curl/pull/8484

- multi: allow user callbacks to call curl_multi_assign

  Several years ago a change was made to block user callbacks from calling
  back into the API when not supported (recursive calls). One of the calls
  blocked was curl_multi_assign. Recently the blocking was extended to the
  multi interface API, however curl_multi_assign may need to be called
  from within those user callbacks (eg CURLMOPT_SOCKETFUNCTION).

  I can't think of any callback where it would be unsafe to call
  curl_multi_assign so I removed the restriction entirely.

  Reported-by: Michael Wallner

  Ref: https://github.com/curl/curl/commit/b46cfbc
  Ref: https://github.com/curl/curl/commit/340bb19

  Fixes https://github.com/curl/curl/issues/8480
  Closes https://github.com/curl/curl/pull/8483

Daniel Stenberg (21 Feb 2022)
- [Michał Antoniak brought this change]

  ssl: reduce allocated space for ssl backend when FTP is disabled

  Add assert() for the backend pointer in many places

  Closes #8471

- [Michał Antoniak brought this change]

  checkprefix: remove strlen calls

  Closes #8481

Jay Satiro (20 Feb 2022)
- [1337vt brought this change]

  curl.h: fix typo

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

- [Jan Venekamp brought this change]

  sectransp: mark a 3DES cipher as weak

  - Change TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA strength to weak.

  All other 3DES ciphers are already marked as weak.

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

- [Jan Venekamp brought this change]

  bearssl: fix EXC_BAD_ACCESS on incomplete CA cert

  - Do not create trust anchor object for a CA certificate until after it
    is processed.

  Prior to this change the object was created at state BR_PEM_BEGIN_OBJ
  (certificate processing begin state). An incomplete certificate (for
  example missing a newline at the end) never reaches BR_PEM_END_OBJ
  (certificate processing end state) and therefore the trust anchor data
  was not set in those objects, which caused EXC_BAD_ACCESS.

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

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

- [Jan Venekamp brought this change]

  bearssl: fix connect error on expired cert and no verify

  - When peer verification is disabled use the x509_decode engine instead
    of the x509_minimal engine to parse and extract the public key from
    the first cert of the chain.

  Prior to this change in such a case no key was extracted and that caused
  CURLE_SSL_CONNECT_ERROR. The x509_minimal engine will stop parsing if
  any validity check fails but the x509_decode won't.

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

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

- [Jan Venekamp brought this change]

  bearssl: fix session resumption (session id)

  Prior to this change br_ssl_client_reset was mistakenly called with
  resume_session param set to 0, which disabled session resumption.

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

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

Daniel Stenberg (18 Feb 2022)
- [Michał Antoniak brought this change]

  openssl: fix build for version < 1.1.0

  Closes #8470

- [Joel Depooter brought this change]

  schannel: move the algIds array out of schannel.h

  This array is only used by the SCHANNEL_CRED struct in the
  schannel_acquire_credential_handle function. It can therefore be kept as
  a local variable. This is a minor update to
  bbb71507b7bab52002f9b1e0880bed6a32834511.

  This change also updates the NUM_CIPHERS value to accurately count the
  number of ciphers options listed in schannel.c, which is 47 instead of
  45. It is unlikely that anyone tries to set all 47 values, but if they
  had tried, the last two would not have been set.

  Closes #8469

- [Alejandro R. Sedeño brought this change]

  configure.ac: use user-specified gssapi dir when using pkg-config

  Using the system pkg-config path in the face of a user-specified
  library path is asking to link the wrong library.

  Reported-by: Michael Kaufmann
  Fixes #8289
  Closes #8456

- [Kevin Adler brought this change]

  os400: Add link to QADRT devkit to README.OS400

  Closes #8455

- [Kevin Adler brought this change]

  os400: Add function wrapper for system command

  The wrapper will exit if the system command failed instead of blindly
  continuing on.

  In addition, only copy docs which exist, since now the copy failure will
  cause the build to stop.

  Closes #8455

- [Kevin Adler brought this change]

  os400: Default build to target current release

  V6R1M0 is not available as a target release since IBM i 7.2. To keep
  from having to keep this up to date in git, default to the current
  release. Users can configure this to whatever release they want to
  actually build for.

  Closes #8455

- docs/INTERNALS.md: clean up, refer to the book

  The explanatory parts are now in the everything curl book (which can
  also use images etc). This document now refers to that resource and only
  leaves listings of supported versions of libs, tools and operating
  systems. See https://everything.curl.dev/internals

  Closes #8467

Marcel Raad (17 Feb 2022)
- des: fix compile break for OpenSSL without DES

  When `USE_OPENSSL` was defined but OpenSSL had no DES support and a
  different crypto library was used for that, `Curl_des_set_odd_parity`
  was called but not defined. This could for example happen on Windows
  and macOS when using OpenSSL v3 with deprecated features disabled.

  Use the same condition for the function definition as used at the
  caller side, but leaving out the OpenSSL part to avoid including
  OpenSSL headers.

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

Daniel Stenberg (17 Feb 2022)
- RELEASE-NOTES: synced

- docs/DEPRECATE: remove NPN support in August 2022

  Closes #8458

- ftp: provide error message for control bytes in path

  Closes #8460

- http: fix "unused parameter ‘conn’" warning

  Follow-up from 7d600ad1c395

  Spotted on appveyor

  Closes #8465

Jay Satiro (17 Feb 2022)
- [Alejandro R. Sedeño brought this change]

  sha256: Fix minimum OpenSSL version

  - Change the minimum OpenSSL version for using their SHA256
    implementation from 0.9.7 to 0.9.8.

  EVP_sha256() does not appear in the OpenSSL source before 0.9.7h, and
  does not get built by default until 0.9.8, so trying to use it for all
  0.9.7 is wrong, and before 0.9.8 is unreliable.

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

Daniel Stenberg (16 Feb 2022)
- KNOWN_BUGS: remove "slow connect to localhost on Windows"

  localhost is not resolved anymore since 1a0ebf6632f88

- KNOWN_BUGS: remove "HTTP/3 download is 5x times slower than HTTP/2"

  It's not actually a bug. More like room for improvement.

- KNOWN_BUGS: remove "HTTP/3 download with quiche halts after a while"

  Follow-up to 96f85a0fef694

- KNOWN_BUGS: remove "pulseUI vpn" as a problem

  We haven't heard about this for a long time and rumours have it they
  might have fixed it.

- urldata: remove conn->bits.user_passwd

  The authentication status should be told by the transfer and not the
  connection.

  Reported-by: John H. Ayad
  Fixes #8449
  Closes #8451

- [Kevin Adler brought this change]

  gskit: Convert to using Curl_poll

  As mentioned in 32766cb, gskit was the last user of Curl_select which is
  now gone. Convert to using Curl_poll to allow build to work on IBM i.

  Closes #8454

- [Kevin Adler brought this change]

  gskit: Fix initialization of Curl_ssl_gskit struct

  In c30bf22, Curl_ssl_getsock was factored out in to a member of
  struct Curl_ssl but the gskit initialization was not updated to reflect
  this new member.

  Closes #8454

- [Kevin Adler brought this change]

  gskit: Fix errors from Curl_strerror refactor

  2f0bb864c1 replaced sterror with Curl_strerror, but the strerror buffer
  shadows the set_buffer "buffer" parameter. To keep consistency with the
  other functions that use Curl_strerror, rename the parameter.

  In addition, strerror.h is needed for the definition of STRERROR_LEN.

  Closes #8454

Marcel Raad (15 Feb 2022)
- ntlm: remove unused feature defines

  They're not used anymore and always supported.

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

Daniel Stenberg (15 Feb 2022)
- [Kantanat Wannapaka brought this change]

  README.md: fix link and layout

  replace <a></a> tags and <img></img> tags

  Closes #8448

- KNOWN_BUGS: fix typo "libpsl"

Jay Satiro (14 Feb 2022)
- h2h3: fix compiler warning due to function prototype mismatch

  - Add missing const qualifier in Curl_pseudo_headers declaration.

Daniel Stenberg (14 Feb 2022)
- [Stefan Eissing brought this change]

  urlapi: handle "redirects" smarter

    - avoid one malloc when setting a new url via curl_url_set()
      and CURLUPART_URL.
    - extract common pattern into a new static function.

  Closes #8450

- cijobs: pick up circleci configure lines better

- circleci: add a job using wolfSSH

  Build only, no tests.

  Closes #8445

- scripts/ciconfig.pl: show used options not available

- circleci: add a job using libssh

  Closes #8444

- runtests: set 'oldlibssh' for libssh versions before 0.9.6

  ... and make test 1459 check for the different return code then.

  Closes #8444

Jay Satiro (13 Feb 2022)
- Makefile.am: Generate VS 2022 projects

  Follow-up to f13d4d0 which added VS 2022 project support.

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

- [Daniel Stenberg brought this change]

  projects: remove support for MSVC before VC10 (Visual Studio 2010)

  - Remove Visual Studio project files for VC6, VC7, VC7.1, VC8 and VC9.

  Those versions are too old to be maintained any longer.

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

- [Stav Nir brought this change]

  projects: add support for Visual Studio 17 (2022)

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

Daniel Stenberg (13 Feb 2022)
- RELEASE-NOTES: synced

- connect: follow-up fix the copyright year

- [Michał Antoniak brought this change]

  misc: remove unused data when IPv6 is not supported

  Closes #8430

- scripts/ciconfig: show CI job config info

  Closes #8446

- quiche: handle stream reset

  A stream reset now causes a CURLE_PARTIAL_FILE error. I'm not convinced
  this is the right action nor the right error code.

  Reported-by: Lucas Pardue
  Fixes #8437
  Closes #8440

- mime: use a define instead of the magic number 24

  MIME_BOUNDARY_DASHES is now the number of leading dashes in the
  generated boundary string.

  Closes #8441

- [Henrik Holst brought this change]

  hostcheck: reduce strlen calls on chained certificates

  Closes #8428

- [Patrick Monnerat brought this change]

  mime: some more strlen() call removals.

  Closes #8423

- scripts/cijobs.pl: detect zuul cmake jobs better

- url: exclude zonefrom_url when no ipv6 is available

  Closes #8439

- if2ip: make Curl_ipv6_scope a blank macro when IPv6-disabled

  Closes #8439

- [Henrik Holst brought this change]

  mprintf: remove strlen calls on empty strings in dprintf_formatf

  Turns out that in dprintf_formatf we did a strlen on empty strings, a
  bit strange is how common this actually is, 24 alone when doing a simple
  GET from https://curl.se

  Closes #8427

- wolfssl: return CURLE_AGAIN for the SSL_ERROR_NONE case

  Closes #8431

- wolfssl: when SSL_read() returns zero, check the error

  Returning zero indicates end of connection, so if there's no data read
  but the connection is alive, it needs to return -1 with CURLE_AGAIN.

  Closes #8431

- quiche: after leaving h3_recving state, poll again

  This could otherwise easily leave libcurl "hanging" after the entire
  transfer is done but without noticing the end-of-transfer signal.

  Assisted-by: Lucas Pardue
  Closes #8436

- quiche: when *recv_body() returns data, drain it before polling again

  Assisted-by: Lucas Pardue

  Closes #8429

- [gaoxingwang on github brought this change]

  configure: fix '--enable-code-coverage' typo

  Fixes #8425
  Closes #8426

- lib/h2h3: #ifdef on ENABLE_QUIC, not the wrong define

  Otherwise the build fails when H3 is enabled but the build doesn't
  include nghttp2.

  Closes #8424

- hostcheck: pass in pattern length too, to avoid a strlen call

  Removes one strlen() call per SAN name in a cert-check.

  Closes #8418

- [Henrik Holst brought this change]

  misc: remove strlen for Curl_checkheaders + Curl_checkProxyheaders

  Closes #8409

- configure: requires --with-nss-deprecated to build with NSS

  Add deprecation plans to docs/DEPRECATE.md

  Closes #8395

- mqtt: free 'sendleftovers' in disconnect

  Fix a memory-leak

  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43646
  Closes #8415

- [Patrick Monnerat brought this change]

  openldap: pass string length arguments to client_write()

  This uses the new STRCONST() macro and saves 2 strlen() calls on short
  string constants per LDIF output line.

  Closes #8404

- [Henrik Holst brought this change]

  misc: reduce strlen() calls with Curl_dyn_add()

  Use STRCONST() to switch from Curl_dyn_add() to Curl_dyn_addn() for
  string literals.

  Closes #8398

- http2: fix the array copy to nghttp2_nv

  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44517
  Follow-up to 9f985a11e794
  Closes #8414

- RELEASE-NOTES: synced

- scripts/cijobs.pl: output data about all currect CI jobs

  This script parses the config files for all the CI services currently in
  use and output the information in a uniform way. The idea is that the
  output from this script should be possible to massage into informational
  tables or graphs to help us visualize what they are all testing and NOT
  testing.

  Closes #8408

- maketgz: return error if 'make dist' fails

  To better detect this problem in CI jobs

  Reported-by: Marcel Raad
  Bug: https://curl.se/mail/lib-2022-02/0070.html
  Closes #8402

- h2h3: pass correct argument types to infof()

  Detected by Coverity. CID 1497993

  Closes #8401

- lib/Makefile: remove config-tpf.h from the dist

  Follow-up from da15443dddea2bfb. Missed before because the 'distcheck'
  CI job was not working as intended.

  Reported-by: Marcel Raad
  Bug: https://curl.se/mail/lib-2022-02/0070.html
  Closes #8403

- configure: remove support for "embedded ares"

  In March 2010 (commit 4259d2df7dd) we removed the embedded 'ares'
  directory from the curl source tree but we have since supported
  especially detecting and using that build directory. The time has come
  to remove that kludge and ask users to specify the c-ares dir correctly
  with --enable-ares.

  Closes #8397

- [Sebastian Sterk brought this change]

  github/workflows/mbedtls: fix indent & remove unnecessary line breaks

  Closes #8399

- CI: move the NSS job from zuul to GHA

  Closes #8396

- tests/unit/Makefile.am: add NSS_LIBS to build with NSS fine

  Closes #8396

Marcel Raad (7 Feb 2022)
- curl-openssl: fix SRP check for OpenSSL 3.0

  When OpenSSL 3.0 is built with `--api=3.0` and `no-deprecated`, the SRP
  functions exist in the library, but are disabled for user code. Check
  if they are actually usable instead of only if they exist. Also, check
  for the functions actually required for TLS-SRP.

  TLS-SRP support is still enabled if OpenSSL is configured with just
  `--api=3.0` or with `--api=1.1.1 no-deprecated`.

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

Daniel Stenberg (7 Feb 2022)
- [Henrik Holst brought this change]

  http: make Curl_compareheader() take string length arguments too

  Also add STRCONST, a macro that returns a string literal and it's length
  for functions that take "string,len"

  Removes unnecesary calls to strlen().

  Closes #8391

- vquic/vquic.h: removed the unused H3 psuedo defines

- ngtcp2: use Curl_pseudo_headers

- quiche: use Curl_pseudo_headers

- http2: use Curl_pseudo_headers

- h2h3: added Curl_pseudo_headers()

  For use with both http2 and http3 requests.

- ngtcp2/quiche: make :scheme possible to set

- http2: allow CURLOPT_HTTPHEADER change ":scheme"

  The only h2 psuedo header that wasn't previously possible to change by a
  user. This change also makes it impossible to send a HTTP/1 header that
  starts with a colon, which I don't think anyone does anyway.

  The other pseudo headers are possible to change indirectly by doing the
  rightly crafted request.

  Reported-by: siddharthchhabrap on github
  Fixes #8381
  Closes #8393

- h2/h3: provide and refer to pseudo headers as defines

  ... and do sizeof() on the defines to use constants better.

  Closes #8389

- [Michał Antoniak brought this change]

  smb: passing a socket for writing and reading data instead of FIRSTSOCKET

  Closes #8383

- x509asn1: toggle off functions not needed for diff tls backends

  ... and clean the header file from private defines/structs (move to C
  file) and unused function prototypes.

  Closes #8386

- lib: move hostcheck and x509sn1 sources to vtls/

  ... since they are used strictly by TLS code.

  Closes #8386

Marcel Raad (4 Feb 2022)
- version_win32: fix warning for `CURL_WINDOWS_APP`

  The build version is not supported by the UWP code.

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

Daniel Stenberg (4 Feb 2022)
- tests/disable-scan.pl: properly detect multiple symbols per line

  Test 1165 would fail on some systems because it didn't detect
  CURL_DISABLE_* symbols that were used to the right of another one on the
  same line! The script would only detect and extract the first one.

  Reported-by: Marcel Raad
  Fixes #8384
  Closes #8388

Jay Satiro (4 Feb 2022)
- config.d: Clarify _curlrc filename is still valid on Windows

  Recent changes added support for filename .curlrc on Windows, and
  when it's not found curl falls back on the original Windows filename
  _curlrc. _curlrc was removed from the doc, however it is still valid.

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

Daniel Stenberg (4 Feb 2022)
- lib: remove support for CURL_DOES_CONVERSIONS

  TPF was the only user and support for that was dropped.

  Closes #8378

- TPF: drop support

  There has been no TPF related changes done since September 2010 (commit
  7e1a45e224e57) and since this is a platform that is relatively different
  than many others (== needs attention), I draw the conclusion that this
  build is broken since a long time.

  Closes #8378

- scripts/delta: check the file delta for current branch

  ... also polish the output style a little bit

Jay Satiro (3 Feb 2022)
- [Fabian Keil brought this change]

  runtests.pl: tolerate test directories without Makefile.inc

  Silences the following warnings when using a Makefile.inc-free
  TESTDIR using the "-o" argument:

     readline() on closed filehandle D at ./runtests.pl line 592.
     Use of uninitialized value $disttests in pattern match (m//) at
     ./runtests.pl line 3602.

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

Daniel Stenberg (3 Feb 2022)
- [Henrik Holst brought this change]

  setopt: do bounds-check before strdup

  Curl_setstropt() allocated memory for the string before checking if the
  string was within bounds. The bounds check should be done first.

  Closes #8377

- [Michał Antoniak brought this change]

  mbedtls: enable use of mbedtls without filesystem functions support

  Closes #8376

- [Bernhard Walle brought this change]

  configure: support specification of a nghttp2 library path

  This enables using --with-nghttp2=<dir> on systems without pkg-config.

  Closes #8375

- scripts/release-notes.pl: remove leftover debug output

- RELEASE-NOTES: synced

- scripts/release-notes.pl: fix number extraction for full URLs

- [Leah Neukirchen brought this change]

  scripts/completion.pl: improve zsh completion

  - Detect all spellings of <file>, <file name> etc as well as <path>.
  - Only complete directories for <dir>.
  - Complete URLs for <URL>.
  - Complete --request and --ftp-method.

  Closes #8363

- [Davide Cassioli brought this change]

  configure: use correct CFLAGS for threaded resolver with xlC on AIX

  Fixes #8276
  Closes #8374

- mailmap: Henrik Holst

Jay Satiro (2 Feb 2022)
- build: fix ngtcp2 crypto library detection

  - Change library link check for ngtcp2_crypto_{gnutls,openssl} to
    to use function ngtcp2_crypto_recv_client_initial_cb instead of
    ngtcp2_crypto_ctx_initial.

  The latter function is no longer external since two days ago in
  ngtcp2/ngtcp2@533451f. curl HTTP/3 CI builds have been failing since
  then because they would not link to the ngtcp2 crypto library.

  Ref: https://github.com/ngtcp2/ngtcp2/pull/356

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

- [Henrik Holst brought this change]

  urlapi: remove an unnecessary call to strlen

  - Use strcpy instead of strlen+memcpy to copy the url path.

  Ref: https://curl.se/mail/lib-2022-02/0006.html

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

Daniel Stenberg (1 Feb 2022)
- scripts/copyright.pl: fix for handling removed files better

- vxworks: drop support

  No changes or fixes in vxworks related code since 2009 leads me to
  believe that this doesn't work anymore.

  Closes #8362

- [Henrik Holst brought this change]

  base64: remove an unnecessary call to strlen

  Closes #8369

- tool_getparam: initial --json support

  Adds these test cases:

   383 - simple single command line option
   384 - reading it from stdin
   385 - getting two --json options on command line
   386 - --next works after --json

  Closes #8314

- [Bjarni Ingi Gislason brought this change]

  curl_getdate.3: remove pointless .PP line

  mandoc: WARNING: skipping paragraph macro: PP empty

  Reported-by: Samuel Henrique
  Closes #8365

- [Sebastian Sterk brought this change]

  multi: grammar fix in comment

  After 'must', the verb is used without 'to'. Correct: "must" or "have
  to"

  Closes #8368

- openldap: fix compiler warning when built without SSL support

  openldap.c:841:52: error: unused parameter ‘data’ [-Werror=unused-parameter]

  Closes #8367

- [Samuel Henrique brought this change]

  CURLSHOPT_LOCKFUNC.3: fix typo "relased" -> "released"

  Found when packaging 7.81.0 for Debian.

  Closes #8364

- netware: remove support

  There are no current users and no Netware related changes done in the
  code for over 13 years is a clear sign this is abandoned.

  Closes #8358

- CI: move two jobs from Zuul to Circle CI

   - openssl-no-verbose
   - openssl-no-proxy

  Closes #8359

- cirlceci: also run a c-ares job on arm with debug enabled

  Closes #8357

- ci: move the OpenSSL + c-ares job from Zuul to Circle CI

  Closes #8357

- mailmap: Jan-Piet Mens

- [luminixinc on github brought this change]

  multi: remember connection_id before returning connection to pool

  Fix a bug that does not require a new CVE as discussed on hackerone.com.
  Previously `connection_id` was accessed after returning connection to
  the shared pool.

  Bug: https://hackerone.com/reports/1463013
  Closes #8355

Jay Satiro (31 Jan 2022)
- write-out.d: Fix num_headers formatting

- [Jan-Piet Mens brought this change]

  docs: capitalize the name 'Netscape'

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

Daniel Stenberg (30 Jan 2022)
- RELEASE-NOTES: synced

- [Antoine Pietri brought this change]

  docs: grammar proofread, typo fixes

  (Partially automated) proofread of most of the documentation, leading to
  various typo fixes.

  Closes #8353

- urldata: CONN_IS_PROXIED replaces bits.close when proxy can be disabled

  To remove run-time checks for such builds.

  Closes #8350

- setopt: fix the TLSAUTH #ifdefs for proxy-disabled builds

  Closes #8350

- conncache: make conncache_add_bundle return the pointer

  Simplifies the logic a little and avoids a ternary operator.

  Ref: #8346
  Closes #8349

- mailmap: neutric on github

Jay Satiro (30 Jan 2022)
- [neutric on github brought this change]

  docs/TheArtOfHttpScripting: fix example POST URL

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

Daniel Stenberg (28 Jan 2022)
- nss: handshake callback during shutdown has no conn->bundle

  The callback gets called because of the call to PR_Recv() done to
  attempt to avoid RST on the TCP connection. The conn->bundle pointer is
  already cleared at this point so avoid dereferencing it.

  Reported-by: Eric Musser
  Fixes #8341
  Closes #8342

- [Michał Antoniak brought this change]

  mbedtls: remove #include <mbedtls/certs.h>

  mbedtls/certs.h file contains only certificates example (all definitions
  is beginning by mbedtls_test_*). None of them is used so we can avoid
  include the file.

  Closes #8343

- [Michał Antoniak brought this change]

  mbedtls: enable use of mbedtls without CRL support

  Closes #8344

- [Bernhard Walle brought this change]

  configure: set CURL_LIBRARY_PATH for nghttp2

  To execute the test program, we might need the library path so that the
  lib is found at runtime.

  Closes #8340

Jay Satiro (28 Jan 2022)
- schannel: restore debug message in schannel_connect_step2

  This is a follow-up to recent commit 2218c3a which removed the debug
  message to avoid an unused variable warning. The message has been
  reworked to avoid the warning.

  Ref: https://github.com/curl/curl/pull/8320#issuecomment-1022957904

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

- test3021: disable all msys2 path transformation

  - Disable all MSYS2 path transformation in test3021 and test3022.

  Prior to this change path transformation in those tests was disabled
  only for arguments that start with forward slashes. However arguments
  that are in base64 contain forward slashes at any position and caused
  unwanted translations.

  == Info: Denied establishing ssh session: mismatch sha256 fingerprint.
  Remote +/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw= is not equal to
  +C:/msys64/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw

  In the above example an argument containing a base64 sha256 fingerprint
  was passed to curl after MSYS2 translated +/ into +C:/msys64/, and then
  the fingerprint didn't match what was expected.

  Ref: https://www.msys2.org/wiki/Porting/

  Fixes https://github.com/curl/curl/issues/8084
  Closes https://github.com/curl/curl/pull/8325

Daniel Stenberg (27 Jan 2022)
- CI: move scan-build job from Zuul to Azure Pipelines

  Closes #8338

Marcel Raad (27 Jan 2022)
- openssl: fix `ctx_option_t` for OpenSSL v3+

  The options have been changed to `uint64_t` in
  https://github.com/openssl/openssl/commit/56bd17830f2d5855b533d923d4e0649d3ed61d11.

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

Daniel Stenberg (27 Jan 2022)
- CI: move 'distcheck' job from zuul to azure pipelines

  Assisted-by: Kushal Das

  Closes #8334

- vtls: pass on the right SNI name

  The TLS backends convert the host name to SNI name and need to use that.
  This involves cutting off any trailing dot and lowercasing.

  Co-authored-by: Jay Satiro
  Closes #8320

- url: revert the removal of trailing dot from host name

  Reverts 5de8d84098db1bd24e (May 2014, shipped in 7.37.0) and the
  follow-up changes done afterward.

  Keep the dot in names for everything except the SNI to make curl behave
  more similar to current browsers. This means 'name' and 'name.' send the
  same SNI for different 'Host:' headers.

  Updated test 1322 accordingly

  Fixes #8290
  Reported-by: Charles Cazabon
  Closes #8320

- [neutric on github brought this change]

  docs/TheArtOfHttpScripting: fix capitalization

  Closes #8333

- tests/memanalyze.pl: also count and show "total allocations"

  This is the total number of bytes allocated, increasing for new
  allocations and never reduced when freed. The existing "Maximum
  allocated" is the high water mark.

  Closes #8330

- mailmap: spellfix githuh => github

- RELEASE-NOTES: synced

- hostcheck: fixed to not touch used input strings

  Avoids the need to clone the strings before check, thus avoiding
  mallocs, which for cases where there are many SAN names in a cert could
  end up numerous.

  Closes #8321

- ngtcp2: adapt to changed end of headers callback proto

  Closes #8322

- [Xiaoke Wang brought this change]

  openssl: check SSL_get_ex_data to prevent potential NULL dereference

  Closes #8268

Jay Satiro (23 Jan 2022)
- md5: check md5_init_func return value

  Prior to this change the md5_init_func (my_md5_init) return value was
  ignored.

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

- md5: refactor for standard compliance

  - Wrap OpenSSL / wolfSSL MD5 functions instead of taking their function
    addresses during static initialization.

  Depending on how curl was built the old way may have used a dllimport
  function address during static initialization, which is not standard
  compliant, resulting in Visual Studio warning C4232 (nonstandard
  extension). Instead the function pointers now point to the wrappers
  which call the MD5 functions.

  This change only affects OpenSSL and wolfSSL because calls to other SSL
  libraries' md5 functions were already wrapped. Also sha256.c already
  does this for all SSL libraries.

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

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

Daniel Stenberg (21 Jan 2022)
- [Lucas Pardue brought this change]

  docs: update IETF links to use datatracker

  The tools.ietf.org domain has been deprecated a while now, with the
  links being redirected to datatracker.ietf.org.

  Rather than make people eat that redirect time, this change switches the
  URL to a more canonical source.

  Closes #8317

- [Harry Sarson brought this change]

  CI: test building wolfssl with --enable-opensslextra

  Closes #8315

- [Harry Sarson brought this change]

  misc: allow curl to build with wolfssl --enable-opensslextra

  put all #include of openssl files behind wolfssl ifdefs so that we can
  use the wolfssl/ prefixed include paths. Without these curl only builds
  when wolfssl is built with enable-all.

  Fixes #8292
  Closes #8315

- [Lucas Pardue brought this change]

  quiche: change qlog file extension to `.sqlog`

  quiche has just switched it's qlog serialization format to JSON-SEQ by
  default . The spec says this SHOULD use `.sqlog` extension.

  I believe ngtcp2 also supports JSON-SEQ by default as of
  https://github.com/ngtcp2/ngtcp2/commit/9baf06fc3f352a1d062b6953ae1de22cae30639d

  Let's update curl so that tools know what format we are using!

  Closes #8316

Jay Satiro (21 Jan 2022)
- projects: Fix Visual Studio wolfSSL configurations

  - Change build-wolfssl.bat to disable SSLv3, enable TLSv1.3, enable
    wolfSSL_DES_ecb_encrypt (needed by NTLM) and enable alt cert chains.

  - Disable warning C4214 'bit field types other than int'.

  - Add include directory wolfssl\wolfssl.

  wolfSSL offers OpenSSL API compatibility that libcurl uses, and some
  recent change in libcurl included an include file for wolfSSL like
  openssl/foo.h, which has a path like wolfssl\wolfssl\openssl\foo.h.

  The include directory issue was reported in #8292 but it's currently
  unclear whether this type of change is needed for other build systems.

  Bug: https://github.com/curl/curl/issues/8292
  Reported-by: Harry Sarson

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

Daniel Stenberg (21 Jan 2022)
- openssl: return error if TLS 1.3 is requested when not supported

  Previously curl would just silently ignore it if the necessary defines
  are not present at build-time.

  Reported-by: Stefan Eissing
  Fixes #8309
  Closes #8310

- TODO: Passing NOTIFY option to CURLOPT_MAIL_RCPT

  Closes #8232

- [Philip H brought this change]

  workflows/wolfssl: install impacket

  needed Python Package for SMB tests

  Closes #8307

- url: make Curl_disconnect return void

   1. The function would only ever return CURLE_OK anyway
   2. Only one caller actually used the return code
   3. Most callers did (void)Curl_disconnect()

  Closes #8303

- docs: document HTTP/2 not insisting on TLS 1.2

  Both for --http2 and CURLOPT_HTTP_VERSION.

  Reported-by: jhoyla on github
  Fixes #8235
  Closes #8300

- cmdline-opts/gen.pl: fix option matching to improve references

  Previously it could mistakenly match partial names when there are
  options that start with the same prefix, leading to the wrong references
  used.

  Closes #8299

- TODO: Less memory massaging with Schannel

- [Patrick Monnerat brought this change]

  runtests.pl: disable debuginfod

  Valgrind and gdb implement this feature: as this highly slows down tests,
  disable it.

  Closes #8291

- RELEASE-NOTES: synced

- CURLMOPT_TIMERFUNCTION/DATA.3: fix the examples

  ... to not call libcurl recursively back.

  Closes #8286

- multi: set in_callback for multi interface callbacks

  This makes most libcurl functions return error if called from within a
  callback using the same multi handle. For example timer or socket
  callbacks calling curl_multi_socket_action.

  Reported-by: updatede on github
  Fixes #8282
  Closes #8286

- docs/HISTORY.md: mention alt-svc and HSTS

- misc: remove the final watcom references

  Follow-up to bbf8cae44dedc495e6

  We removed support for the watcom builds files back in September
  2020. This removes all remaining watcom references and ifdefs.

  Closes #8287

- misc: remove BeOS code and references

  There has not been a mention of this OS in any commit since December
  2004 (58f4af7973e3d2). The OS is also long gone.

  Closes #8288

- tool_getparam: DNS options that need c-ares now fail without it

  Just silently accepting the options and then not having any effect is
  not good.

  Ref: #8283
  Closes #8285

- curl: remove "separators" (when using globbed URLs)

  Unless muted (with -s) When doing globbing, curl would output mime-like
  separators between the separate transfers. This is not documented
  anywhere, surprises users and clobbers the output. Gone now.

  Updated test 18 and 1235

  Reported-by: jonny112 on github
  Bug: https://github.com/curl/curl/discussions/8257
  Closes #8278

Jay Satiro (15 Jan 2022)
- [Niels Martignène brought this change]

  mbedtls: fix CURLOPT_SSLCERT_BLOB (again)

  - Increase the buffer length passed to mbedtls_x509_crt_parse to account
    for the null byte appended to the temporary blob.

  Follow-up to 867ad1c which uses a null terminated copy of the
  certificate blob, because mbedtls_x509_crt_parse requires PEM data
  to be null terminated.

  Ref: https://github.com/curl/curl/commit/867ad1c#r63439893
  Ref: https://github.com/curl/curl/pull/8146

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

Daniel Stenberg (15 Jan 2022)
- [Alessandro Ghedini brought this change]

  quiche: verify the server cert on connect

  Similarly to c148f0f551f9bea0e3d0, make quiche correctly acknowledge
  `CURLOPT_SSL_VERIFYPEER` and `CURLOPT_SSL_VERIFYHOST`.

  Fixes #8173
  Closes #8275

- [Ikko Ashimine brought this change]

  checksrc: fix typo in comment

  enfore -> enforce

  Closes #8281

- curl-openssl: remove the OpenSSL headers and library versions check

  It is more work to maintain that check than the (any?) benefit it
  brings.

  Fixes #8279
  Reported-by: Satadru Pramanik
  Closes #8280

- mqtt: free any leftover when done

  Oss-fuzz found an issue when the "sendleftovers" pointer could leak memory.
  Fix this by always freeing it (if still assigned) in the done function.

  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43515
  Closes #8274

- formdata: avoid size_t => long typecast overflows

  Typically a problem for platforms with 32 bit long and 64 bit size_t

  Reported-by: Fabian Yamaguchi
  Bug: https://hackerone.com/reports/1444539
  Closes #8272

- RELEASE-NOTES: synced

  bump next release to become 7.82.0

Marcel Raad (13 Jan 2022)
- build: enable -Warith-conversion

  This makes the behavior consistent between GCC 10 and earlier versions.

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

- build: fix -Wenum-conversion handling

  Don't enable that warning when warnings are disabled.
  Also add it to CMake.

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

- appveyor: use VS 2017 image for the autotools builds

  The newer images don't have all required MSYS2 packages.

  Fixes https://github.com/curl/curl/issues/8248
  Closes https://github.com/curl/curl/pull/8265

- appveyor: update images from VS 2019 to 2022

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

Daniel Stenberg (12 Jan 2022)
- [Michał Antoniak brought this change]

  mbedtls: return CURLcode result instead of a mbedtls error code

  ... when a certificate fails to be loaded from a blob

  Closes #8266

- curl_multi_socket.3: remove callback and typical usage descriptions

  1. The callback is better described in the option for setting it. Having
  it in a single place reduces the risk that one of them is wrong.

  2. The "typical usage" is wrong since the functions described in this
  man page are both deprecated so they cannot be used in any "typical" way
  anymore.

  Closes #8262

- curl-functions.m4: revert DYLD_LIBRARY_PATH tricks in CURL_RUN_IFELSE

  Mostly reverts ba0657c343f, but now instead just run the plain macro on
  darwin. The approach as used on other platforms is simply not necessary
  on macOS.

  Fixes #8229
  Reported-by: Ryan Schmidt
  Closes #8247

- [Patrick Monnerat brought this change]

  openldap: implement SASL authentication

  As credentials can be quite different depending on the mechanism used,
  there are no default mechanisms for LDAP and simple bind with a DN is
  then used.

  The caller has to provide mechanism(s) using CURLOPT_LOGIN_OPTIONS to
  enable SASL authentication and disable simple bind.

  Closes #8152

Jay Satiro (10 Jan 2022)
- [Cameron Will brought this change]

  CURLOPT_RESOLVE.3: change example port to 443

  83cc966 changed documentation from using http to https. However,
  CURLOPT_RESOLVE being set to port 80 in the documentation means that it
  isn't valid for the new URL. Update to 443.

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

Daniel Stenberg (10 Jan 2022)
- [Fabian Keil brought this change]

  test374: gif data without new line at the end

  Closes #8239

- [Fabian Keil brought this change]

  runtests.pl: support the nonewline attribute for the data part

  Added to FILEFORMAT

  Closes #8239

- [Patrick Monnerat brought this change]

  curl tool: erase some more sensitive command line arguments

  As the ps command may reveal sensitive command line info, obfuscate
  options --tlsuser, --tlspasswd, --proxy-tlsuser, --proxy-tlspassword and
  --oauth2-bearer arguments.

  Reported-by: Stephen Boost <s.booth@epcc.ed.ac.uk>

  Closes #7964

- mesalink: remove support

  Mesalink has ceased development. We can no longer encourage use of it.
  It seems to be continued under the name TabbySSL, but no attempts have
  (yet) been to make curl support it.

  Fixes #8188
  Closes #8191

- ldap: return CURLE_URL_MALFORMAT for bad URL

  For consistency, use the same return code for URL malformats,
  independently of what scheme that is used. Previously this would return
  CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.

  Closes #8170

- docs/cmdline-opts: add "mutexed" options for more http versions

  Update four http version man page sections.

  Closes #8254

- [Stephen M. Coakley brought this change]

  rustls: add CURLOPT_CAINFO_BLOB support

  Add support for `CURLOPT_CAINFO_BLOB` `CURLOPT_PROXY_CAINFO_BLOB` to the
  rustls TLS backend. Multiple certificates in a single PEM string are
  supported just like OpenSSL does with this option.

  This is compatible at least with rustls-ffi 0.8+ which is our new
  minimum version anyway.

  I was able to build and run this on Windows, pulling trusted certs from
  the system and then add them to rustls by setting
  `CURLOPT_CAINFO_BLOB`. Handy!

  Closes #8255

- scripts/copyright.pl: ignore missing files

- RELEASE-NOTES: synced

- data/DISABLED: disable test 313 for wolfssl builds

  It was previously disabled only in the CI jobs yaml

  Closes #8252

- runtests: make 'wolfssl' a testable feature

  Closes #8252

- GHA: install stunnel in the medbtls + wolfssl CI jobs

  Closes #8252

- CI: move the rustls CI job to GHA from Zuul

  Closes #8251

- DISABLE: disable a dozen tests in the rustls build

  Disables tests that don't yet work with the rustls backend.

  Fixes #8004
  Closes #8250

- runtests: make 'rustls' a testable feature

- remote-header-name.d: clarify

  - it strips off the path from the server provided name
  - it saves in current directory or --output-dir

  Ref: https://curl.se/mail/archive-2022-01/0032.html
  Closes #8249

- url: given a user in the URL, find pwd for that user in netrc

  Add test 380 and 381 to verify, edited test 133

  Reported-by: Manfred Schwarb
  Fixes #8241
  Closes #8243

- [Niels Martignène brought this change]

  mbedtls: Fix ssl_init error with mbedTLS 3.1.0+

  Since mbedTLS 3.1.0, mbedtls_ssl_setup() fails if the provided
  config struct is not valid.

  mbedtls_ssl_config_defaults() needs to be called before the config
  struct is passed to mbedtls_ssl_setup().

  Closes #8238

- [Filip Lundgren brought this change]

  cmake: fix iOS CMake project generation error

  Closes #8244

- ngtcp2: fix declaration of ‘result’ shadows a previous local

  Follow-up to 8fbd6feddfa587cfd3

  Closes #8245

- openssl.h: avoid including OpenSSL headers here

  ... by instead using the struct version of the typedef'ed pointer. To
  fix build errors when both Schannel and OpenSSL are enabled.

  Fixes #8240
  Reported-by: Jan Ehrhardt
  Closes #8246

- curl_url_set.3: mention when CURLU_ALLOW_SPACE was added

- tool_findfile: free mem properly

  Follow-up to 764e4f066d5

  Closes #8242

- tool_findfile: check ~/.config/curlrc too

  ... after the initial checks for .curlrc and if XDG_CONFIG_HOME is not
  set, use $HOME and $CURL_HOME to check if ~/.config/curlrc is present.

  Add test 436 to verify

  Reported-by: Sandro Jaeckel
  Fixes #8208
  Closes #8213

- runtests: allow client/file to specify multiple directories

  ... and make sure to mkdir them all

- scripts/copyright.pl: support many provided file names on the cmdline

- [Fabian Keil brought this change]

  tests/FILEFORMAT.md: fix typo

- [Fabian Keil brought this change]

  Add test373: multiple chunks with binary zeros

- [Fabian Keil brought this change]

  Add test372: binary zero in data element

- [Fabian Keil brought this change]

  tests/server/getpart.c: properly deal with binary data containing NUL bytes

- [Fabian Keil brought this change]

  runtests.pl: properly print the test if it contains binary zeros

- mailmap: Xiaoke Wang

- openssl: copyright year update

  Follow-up to 30aea2b1ede

- scripts/copyright.pl: hush unless -v (for verbose) is used

- [Xiaoke Wang brought this change]

  openssl: check the return value of BIO_new_mem_buf()

  Closes #8233

- examples/multi-app.c: call curl_multi_remove_handle as well

  Fixes #8234
  Reported-by: Melroy van den Berg
  Closes #8236

- COPYING: bump copyright year range

- RELEASE-NOTES: synced

  and bump curlver after release

- docs: fix mandoc -T lint formatting complaints

  Closes #8228

- next.d. remove .fi/.nf as they are handled by gen.pl

  Closes #8228

- gen.pl: terminate "example" sections better

  If the example (section that is prefixed with spaces) ends the
  description gen.pl would previously miss to output the terminating .fi

  Closes #8228

- [Satadru Pramanik brought this change]

  curl-functions.m4: fix LIBRARY_PATH adjustment to avoid eval

  $$ usage in a m4 file introduces the PID in linux.
  Instead, just duplicate previous working code with a case switch.

  Fixes #8229
  Closes #8230

Version 7.81.0 (5 Jan 2022)

Daniel Stenberg (5 Jan 2022)
- RELEASE-NOTES: synced

  curl 7.81.0 release

- THANKS: add names from 7.81.0 release

- curl_multi_init.3: fix the copyright year range

- test719-721: require "proxy" feature present to run

  Bug: https://github.com/curl/curl/pull/8223#issuecomment-1005188696
  Reported-by: Marc Hörsken

  Closes #8226

- test719: require ipv6 support to run

  Follow-up to effd2bd7ba2a5fd244
  Reported-by: Marc Hörsken
  Bug: https://github.com/curl/curl/pull/8217#issuecomment-1004681145

  Closes #8223

- test719-721: verify SOCKS details

  Using the new verify/socks details

- runtests: add verify/socks check

  If used, this data is compared with the data in log/socksd-request.log
  which the socksd server logs.

  Added to FILEFORMAT.md

- server/socksd: log atyp + address in a separate log

  To allow the test suite to verify that the right data arrived

- socks5: use appropriate ATYP for numerical IP address host names

  When not resolving the address locallly (known as socks5h).

  Add test 719 and 720 to verify.

  Reported-by: Peter Piekarski
  Fixes #8216
  Closes #8217

Jay Satiro (3 Jan 2022)
- curl_multi_init.3: fix EXAMPLE formatting

Daniel Stenberg (3 Jan 2022)
- RELEASE-NOTES: synced

- libtest: avoid "assignment within conditional expression"

  In lib530, lib540 and lib582

  Closes #8218

- ftp: disable warning 4706 in MSVC

  Follow-up to 21248e052d

  Disabling "assignment within conditional expression" for MSVC needs to
  be done before the function starts, for it to take effect.

  Closes #8218

- tool_operate: warn if too many output arguments were found

  More output instructions than URLs is likely a user error.

  Add test case 371 to verify

  Closes #8210

- .github/workflows/mbedtls.yml: bump to mbedtls 3.1.0

  Closes #8215

- zuul: remove the mbedtls jobs

  Now running as github workflows

  Closes #8215

- github/workflows: add mbedtls and mbedtls-clang

  Closes #8215

- [Valentin Richter brought this change]

  mbedtls: fix private member designations for v3.1.0

  "As a last resort, you can access the field foo of a structure bar by
  writing bar.MBEDTLS_PRIVATE(foo). Note that you do so at your own risk,
  since such code is likely to break in a future minor version of Mbed
  TLS." -
  https://github.com/ARMmbed/mbedtls/blob/f2d1199edc5834df4297f247f213e614f7782d1d/docs/3.0-migration-guide.md

  That future minor version is v3.1.0. I set the >= to == for the version
  checks because v3.1.0 is a release, and I am not sure when the private
  designation was reverted after v3.0.0.

  Closes #8214

- [Valentin Richter brought this change]

  cmake: prevent dev warning due to mismatched arg

  -- curl version=[7.81.0-DEV]
  CMake Warning (dev) at /usr/share/cmake-3.22.1/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
    The package name passed to `find_package_handle_standard_args` (MBEDTLS)
    does not match the name of the calling package (MbedTLS).  This can lead to
    problems in calling code that expects `find_package` result variables
    (e.g., `_FOUND`) to follow a certain pattern.
  Call Stack (most recent call first):
    deps/curl/CMake/FindMbedTLS.cmake:31 (find_package_handle_standard_args)
    deps/curl/CMakeLists.txt:473 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  Closes #8207

- urlapi: if possible, shorten given numerical IPv6 addresses

  Extended test 1560 to verify

  Closes #8206

- [Michał Antoniak brought this change]

  url: reduce ssl backend count for CURL_DISABLE_PROXY builds

  Closes #8212

- KNOWN_BUGS: "Trying local ports fails on Windows"

  Reported-by: gclinch on github
  Closes #8112

- misc: update copyright year range

- zuul: remove the wolfssl even more

  Follow-up to 1914465cf180d32b3d

- examples/multi-single.c: remove WAITMS()

  As it isn't used.

  Reported-by: Melroy van den Berg
  Fixes #8200
  Closes #8201

- gtls: add gnutls include for the session type

  Follow-up to 8fbd6feddfa5 to make it build more universally

- m4/curl-compilers: tell clang -Wno-pointer-bool-conversion

  To hush compiler warnings we don't care for: error: address of function
  'X' will always evaluate to 'true'

  Fixes #8197
  Closes #8198

- http_proxy: don't close the socket (too early)

  ... and double-check in the OpenSSL shutdown that the socket is actually
  still there before it is used.

  Fixes #8193
  Closes #8195

  Reported-by: Leszek Kubik

- ngtcp2: verify the server certificate for the gnutls case

  Closes #8178

- ngtcp2: verify the server cert on connect (quictls)

  Make ngtcp2+quictls correctly acknowledge `CURLOPT_SSL_VERIFYPEER` and
  `CURLOPT_SSL_VERIFYHOST`.

  The name check now uses a function from lib/vtls/openssl.c which will
  need attention for when TLS is not done by OpenSSL or is disabled while
  QUIC is enabled.

  Possibly the servercert() function in openssl.c should be adjusted to be
  able to use for both regular TLS and QUIC.

  Ref: #8173
  Closes #8178

- zuul: remove the wolfssl build

- github workflow: add wolfssl

  Closes #8196

- [Nicolas Sterchele brought this change]

  zuul: fix quiche build pointing to wrong Cargo

  Fixes #8184
  Closes #8189

- checksrc: detect more kinds of NULL comparisons we avoid

  Co-authored-by: Jay Satiro
  Closes #8180

- RELEASE-NOTES: synced

- mesalink: remove the BACKEND define kludge

  Closes #8183

- schannel: remove the BACKEND define kludge

  Closes #8182

- gtls: check return code for gnutls_alpn_set_protocols

  Closes #8181

- [Stefan Huber brought this change]

  README: label the link to the support document

  Closes #8185
